|
Administrator
|
Here's a question for ViAnn and the other experts on GPL. The Command Syntax Reference manual has this nice example showing how to add a regression line (or fit line) to a scatter-plot:
* Uses "Employee data.sav" . GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: salbegin=col(source(s), name("salbegin")) DATA: salary=col(source(s), name("salary")) GUIDE: axis(dim(1), label("Beginning Salary")) GUIDE: axis(dim(2), label("Current Salary")) ELEMENT: point(position(salbegin*salary)) ELEMENT: line(position(smooth.linear(salbegin*salary))) END GPL. Is there a way to also add mean and individual prediction intervals? If so, I've not been able to find it. Thanks, Bruce
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
Try the region.confi.smooth.linear function for the confidence interval of
the mean. I don't think you can get the confidence interval of the individual point. Specify a separate element, usually a line or area. Here's an example: GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: salbegin=col(source(s), name("salbegin")) DATA: salary=col(source(s), name("salary")) GUIDE: axis(dim(1), label("Beginning Salary")) GUIDE: axis(dim(2), label("Current Salary")) ELEMENT: area(position(region.confi.smooth.linear(salbegin*salary)),color(color.gray) ) ELEMENT: point(position(salbegin*salary), color(color.black), transparency(transparency.".5")) ELEMENT: line(position(smooth.linear(salbegin*salary)),size(size."3px")) END GPL. The area element is lowest on the z-order. The points are solid but transparent to distinguish overlap. The regression line is bold. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: Monday, March 08, 2010 3:01 PM To: [hidden email] Subject: Add prediction intervals to scatterplot via GPL Here's a question for ViAnn and the other experts on GPL. The Command Syntax Reference manual has this nice example showing how to add a regression line (or fit line) to a scatter-plot: * Uses "Employee data.sav" . GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: salbegin=col(source(s), name("salbegin")) DATA: salary=col(source(s), name("salary")) GUIDE: axis(dim(1), label("Beginning Salary")) GUIDE: axis(dim(2), label("Current Salary")) ELEMENT: point(position(salbegin*salary)) ELEMENT: line(position(smooth.linear(salbegin*salary))) END GPL. Is there a way to also add mean and individual prediction intervals? If so, I've not been able to find it. Thanks, Bruce ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://old.nabble.com/Add-prediction-intervals-to-scatterplot-via-GPL-tp2782 8331p27828331.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 ===================== 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 |
|
Administrator
|
Thanks ViAnn. Given that mean and individual prediction intervals can be added so easily via IGRAPH, I find it a bit surprising that there's not a straightforward way to get both via GPL.
Bruce
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
I may be wrong about the inability to get individual levels but if I am not,
you're right. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: Tuesday, March 09, 2010 8:03 AM To: [hidden email] Subject: Re: Add prediction intervals to scatterplot via GPL Thanks ViAnn. Given that mean and individual prediction intervals can be added so easily via IGRAPH, I find it a bit surprising that there's not a straightforward way to get both via GPL. Bruce ViAnn Beadle wrote: > > Try the region.confi.smooth.linear function for the confidence > interval of the mean. I don't think you can get the confidence > interval of the individual point. > Specify a separate element, usually a line or area. Here's an example: > > GGRAPH > /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary > MISSING=LISTWISE REPORTMISSING=NO > /GRAPHSPEC SOURCE=INLINE. > BEGIN GPL > SOURCE: s=userSource(id("graphdataset")) > DATA: salbegin=col(source(s), name("salbegin")) > DATA: salary=col(source(s), name("salary")) > GUIDE: axis(dim(1), label("Beginning Salary")) > GUIDE: axis(dim(2), label("Current Salary")) > ELEMENT: > area(position(region.confi.smooth.linear(salbegin*salary)),color(color > .gray) > ) > ELEMENT: point(position(salbegin*salary), color(color.black), > transparency(transparency.".5")) > ELEMENT: > line(position(smooth.linear(salbegin*salary)),size(size."3px")) > END GPL. > > The area element is lowest on the z-order. The points are solid but > transparent to distinguish overlap. The regression line is bold. > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf > Of Bruce Weaver > Sent: Monday, March 08, 2010 3:01 PM > To: [hidden email] > Subject: Add prediction intervals to scatterplot via GPL > > Here's a question for ViAnn and the other experts on GPL. The Command > Syntax Reference manual has this nice example showing how to add a > regression line (or fit line) to a scatter-plot: > > * Uses "Employee data.sav" . > > GGRAPH > /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary /GRAPHSPEC > SOURCE=INLINE. > BEGIN GPL > SOURCE: s=userSource(id("graphdataset")) > DATA: salbegin=col(source(s), name("salbegin")) > DATA: salary=col(source(s), name("salary")) > GUIDE: axis(dim(1), label("Beginning Salary")) > GUIDE: axis(dim(2), label("Current Salary")) > ELEMENT: point(position(salbegin*salary)) > ELEMENT: line(position(smooth.linear(salbegin*salary))) > END GPL. > > Is there a way to also add mean and individual prediction intervals? > If so, I've not been able to find it. > > Thanks, > Bruce > > > > ----- > -- > Bruce Weaver > [hidden email] > http://sites.google.com/a/lakeheadu.ca/bweaver/ > "When all else fails, RTFM." > > NOTE: My Hotmail account is not monitored regularly. > To send me an e-mail, please use the address shown above. > -- > View this message in context: > http://old.nabble.com/Add-prediction-intervals-to-scatterplot-via-GPL- > tp2782 > 8331p27828331.html > Sent from the SPSSX Discussion mailing list archive at Nabble.com. > > ===================== > 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 > > ===================== > 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 > > ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://old.nabble.com/Add-prediction-intervals-to-scatterplot-via-GPL-tp2782 8331p27836898.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 ===================== 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 |
|
Administrator
|
I know I can add fit lines (total or subgroup) to a scatter-plot via a template. (I'm working with an old syntax file right now where I do that.) Maybe prediction intervals can also be added that way. I'll try later, when I'm not in the middle of something.
Bruce
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
| Free forum by Nabble | Edit this page |
