Proc sgpanel - linearity

Super Contributor
Posts: 499

Proc sgpanel - linearity

I was using the below two procs to find out the linearity between dependent varaibles when my model statement for MANCOVA analysis is 'model bal_mix bal=age gender'; Regardless of gender (categorical) all the other variable is numerical variable.

proc sgpanel data=scatter_data

noautolegend;

panelby gender / uniscale=row;

reg x=age y=bal_mix / lineattrs=(color=red thickness=2);

run;

proc sgpanel data=scatter_data

noautolegend;

panelby gender / uniscale=row;

reg x=age y=bal/ lineattrs=(color=red thickness=2);

run;

I wanted to make sure that these procs are correct to check the linearity. On a related note, what are the other procs to check the linearity to the dependent variable?

Valued Guide
Posts: 684

Re: Proc sgpanel - linearity

The graphics procedures are not the best way to check for linearity. Use PROC REG.

proc reg;

by gender;

model bal = age;

run;

You get lots of diagnostic plots.

Super Contributor
Posts: 499

Re: Proc sgpanel - linearity

What about the other variable bal_mix?

Do I need to repeat a proc reg by modifying the variable name like below?

proc reg;

by gender;

model bal_mix = age;

run;

Valued Guide
Posts: 684

Re: Proc sgpanel - linearity

Of course. By the way, I highly recommend that you do some reading about regression analysis, and so on, using SAS. There is a great deal of on-line documentation; this forum can't teach you everything from scratch.  I suggest you start with Introduction Regression Procedures chapter in the User's Guide.

http://support.sas.com/documentation/onlinedoc/stat/930/introreg.pdf

If you can get the book, I highly recommend that you read "SAS for Linear Models" (2002) by Littell et al. This came out before the SG graphics, but the material is thorough and clear. Book nicely moves into multivariate methods and also covariance analysis.

Super Contributor
Posts: 499

Re: Proc sgpanel - linearity

There was not much information about 'Panel of Regression' plot. Figure 4.4 in the document.

May I request you to offer some help?

Valued Guide
Posts: 684

Re: Proc sgpanel - linearity

These types of graphs are explained in modern regression textbook. Also in the REG chapter of the Stat User's Guide.

Super Contributor
Posts: 499

Re: Proc sgpanel - linearity

I've looked at SAS/STAT(R) 9.2 User's Guide, Second Edition but we don't have better explanation whereas modern regression textbook is not available for free.

May I request you to tell me (if possible) in a word or two to confirm the linearity by looking at the 'Panel of Regression' plot?

Discussion stats
• 6 replies
• 353 views
• 3 likes
• 2 in conversation