Date: Mon, 6 Oct 2008 15:05:30 -0700
Reply-To: "Pardee, Roy" <pardee.r@GHC.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pardee, Roy" <pardee.r@GHC.ORG>
Subject: Re: understanding regression equation output from gplot w/I = rc
Content-Type: text/plain; charset="us-ascii"
A worthy question. Seems like a bug...
I'm running v9.1.3 Service Pack 4 on the XP_PRO platform, by the way.
From: ./ ADD NAME=Data _null_, [mailto:firstname.lastname@example.org]
Sent: Monday, October 06, 2008 1:04 PM
To: Pardee, Roy
Cc: SAS-L@listserv.uga.edu; Ross, Tyler
Subject: Re: understanding regression equation output from gplot w/I = rc option.
Yes they are truncated at column 133. But why? This example reproduces the problem using sashelp.class.
symbol i=rc v=dot;
proc gplot data=sashelp.class(rename=(height=proportion_enrolled
*plot height * weight = sex / regeqn;
plot proportion_enrolled * years_past=enroll_type / regeqn;
If you can shorten the names of your variables you should be able to see all of the equation. y * x = z :)
On 10/6/08, Pardee, Roy <email@example.com> wrote:
> Gaaaaaahhhh!!! You're right of course. <slinks off in
> So I guess those eq's are just truncated for some reason?
> -----Original Message-----
> From: ./ ADD NAME=Data _null_, [mailto:firstname.lastname@example.org]
> Sent: Monday, October 06, 2008 12:28 PM
> To: Pardee, Roy
> Cc: SAS-L@listserv.uga.edu
> Subject: Re: understanding regression equation output from gplot w/I = rc option.
> i = rc
> Isn't that Cubic model?
> INTERPOL=R<type><0><CLM | CLI<50...99>> I=R<type><0><CLM |
> CLI<50...99>> specifies that a plot is a regression analysis. By
> default, regression lines are not forced through plot origins and confidence limits are not displayed.
> Type specifies the type of regression. Specify one of these values for type:
> L requests linear regression representing the regression equation
> Y= 0 + 1 X
> Q requests quadratic regression representing the regression equation
> Y= 0 + 1 X + 2 X2
> C requests cubic regression representing the regression equation
> Y= 0 + 1 X+ 2 X 2 + 3 X3
> On 10/6/08, Pardee, Roy <email@example.com> wrote:
> > Hey All,
> > I'm doing a plot w/an overlaid quadratic regression line w/code like so:
> > symbol
> > i = rc
> > ;
> > proc gplot data = gnu ;
> > plot proportion_enrolled * years_past = enroll_type / regeqn
> > vaxis = axis1
> > haxis = axis2
> > vref = 0 to 1 by .10 ;
> > run ;
> > This produces these NOTEs:
> > NOTE: Regression equation : proportion_enrolled(enroll_type:IGP) = 0.982815 -
> > 0.164089*years_past + 0.01827*years_past^2 - 0.000869 .
> > NOTE: Regression equation : proportion_enrolled(enroll_type:Network) = 0.981553 -
> > 0.224816*years_past + 0.02563*years_past^2 - 0.00 .
> > The same output is printed on the plot. But when I plug numbers into those equations to produce predicted values, they do not track the lines on the plots at all. In particular, that first eq would have the curve bending back up at about 6 years_past, which is very much not the case on the plot. I'm also having a hard time interpreting those last terms in each equation--shouldn't those be merged with the intercept?
> > Finally, if I fit a quadratic model w/GLM one value of enroll_type at a time, I get very different parameters. Specifically, for that first eq I get:
> > proportion_enrolled = 0.9599312804 -.1295297017*years_past +
> > 0.0076288600*years_past^2
> > rather than:
> > proportion_enrolled = 0.982815 -.164089 *years_past + 0.01827 *years_past^2
> > That eq *does* match the line printed on the plot.
> > So it looks like the gplot equations are just wrong. What gives?
> > Thanks!
> > -Roy
> > Roy Pardee
> > Research Analyst/Programmer
> > Group Health Center For Health Studies (Cancer Research Network)
> > (206) 287-2078
> > Google Talk: rpardee