Login  Register

Re: limit range of fit lines for subgroups (GPL)

classic Classic list List threaded Threaded
1 message Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: limit range of fit lines for subgroups (GPL)

Kylie
128 posts
Hi everyone,

Just to follow up on my post (below) of 23rd March. I submitted this to SPSS
Technical Support and they say it is not possible to limit the range of subgroup
fit lines. It has been lodged as an enhancement request.

Kylie.


Quoting Kylie Lange <[hidden email]>:

> (Apologies if this is a duplicate post - I sent it a couple days ago but I
> see it is not in the archives. Sent again with minor formatting changes.)
>
>
> Hi everyone,
>
> I am using GGRAPH/GPL to draw a scatterplot including fit lines for each
> subgroup. The default behaviour for the fit lines is that each line is
> extended across the full range of the chart. I would like each line to only
> extend over the observed range for that subgroup.
>
> I found the following post in the archives (below), but when I include it in
> my syntax it is drawing the fit line for the whole group, not the subgroups
> (though the range is limited to the observed min/max).
>
> Can anyone suggest a modification that gives me the fit lines for each
> subgroup, limited to their observed ranges?
>
> GGRAPH
>   /GRAPHDATASET NAME="graphdataset" VARIABLES=glp_AUC av_EI subject
>   /GRAPHSPEC SOURCE=INLINE.
> BEGIN GPL
>   SOURCE: s=userSource(id("graphdataset"))
>   DATA: glp_AUC=col(source(s), name("glp_AUC"))
>   DATA: av_EI=col(source(s), name("av_EI"))
>   DATA: subject=col(source(s), name("subject"), unit.category())
>   GUIDE: axis(dim(1), label("glp_AUC"))
>   GUIDE: axis(dim(2), label("av_EI"))
>   GUIDE: legend(aesthetic(aesthetic.color.exterior), label("subject"))
>   ELEMENT: point(position(glp_AUC*av_EI), color.exterior(subject))
>   ELEMENT: line(position(smooth.linear(glp_AUC*av_EI)))
>   SCALE: linear(dim(1), dataMaximum(), dataMinimum())
> END GPL.
>
> Thanks,
> Kylie.
>
> ==============================================
> Date:         Thu, 25 Jan 2007 08:51:36 -0600
> From:         "Peck, Jon" <[hidden email]>
> Subject:      Re: GGraph  How to limit scatterplot regression lines to
>               actual data              range?
>
> Yes, you can do this. Add the following to your GPL.
>
> SCALE: linear(dim(1), dataMaximum(), dataMinimum())
>
> The fit line would be something like ELEMENT:
> line(position(smooth.linear(x*y))) and the SCALE specification will limit
> the extent of the line.
>
> The SCALE statement does not interfere with the margin specification, so you
> should still see the axes set off slightly from the points.
>
> HTH, Jon Peck
>
> -----Original Message----- From: SPSSX(r) Discussion
> [mailto:[hidden email]] On Behalf Of Art Kendall Sent: Wednesday,
> January 24, 2007 10:52 AM To: [hidden email] Subject: [SPSSX-L]
> GGraph How to limit scatterplot regression lines to actual data range?
>
> I am creating a scatter plot with 3 groups and imposed linear regression fit
> lines using GRAPH in version 15.
>
> Is there a way in GPL to limit each line to the range of actual data?
>
> Art Kendall Social Research Consultants
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>


--
Kylie Lange
Biostatistician
Centre of Clinical Research Excellence (CCRE) in
Nutritional Physiology, Interventions and Outcomes
Discipline of Medicine
The University of Adelaide

Phone (Mon-Wed, Fri @ UniAdel): (08) 8222 5973
Phone (Thurs @ CSIRO): (08) 8303 8860
Fax: (08) 8223 3870
Web: www.adelaide.edu.au/ccre-nutrition
E-mail: [hidden email]

CRICOS Provider Number 00123M
-----------------------------
IMPORTANT: This message may contain confidential or legally privileged
information. If you think it was sent to you by mistake, please delete all
copies and advise the sender. For the purposes of the SPAM Act 2003, this email
is authorised by The University of Adelaide.

Think green: read on the screen.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD