Programming the statistical procedures from SAS

Regression_Plots

Reply
New Contributor
Posts: 4

Regression_Plots

[ Edited ]

I have produced a regression model where the dependent variable is binary type (0,1) and the independent variables are categorical for which i have used dummy variables.What kind of plots can i use for the model?

following codes were used:

 

proc glmmod data = traindata outdesign=GLMDesign1 outparm=GLMParm1;
class v24 v30 v31 v47 v56 v62 v66 v72 v79 v112 v113 ;
model target = v24 v30 v31 v47 v56 v62 v66 v72 v79 v112 v113;
run;

 

proc glm data = traindata;
class v24 v30 v31 v47 v56 v62 v66 v72 v79 v112 v113 ;
model target = v24 v30 v31 v47 v56 v62 v66 v72 v79 v112 v113 / solution clparm;
ods select ParameterEstimates;
quit;

 

proc reg data = GLMDesign1 outest = regout plots(MAXPOINTS = NONE) = all;
DummyVars:model target = col2 col3 col7 col12 col14 col18 col22 col24 col32 col36 col45 col81
                         col86 col90 col94 col97 col102 col105 col112 col116 col120 col126 col133 col152 col157 col159 col164 / P R;
ods select ParameterEstimates;
OUTPUT OUT = stat
P=pred R=Residual RSTUDENT=r1 DFFITS=dffits
COOKD=cookd H=hatvalue PRESS=res_del ;
quit;

 

proc reg data = GLMDesign1 outest = regout1 plots = all;
DummyVars:model target = col9 col11 col19-col21 col25 col30 col34 col38-col40 col56 col59 col61 col62
col72 col74 col75 col82 col85 col96 col97 col112 ;
ods select ParameterEstimates;
quit;

Grand Advisor
Posts: 16,893

Re: Regression_Plots

If your dependent variable is 0/1 why aren't you using logistic regression?

I may be missing something though.

New Contributor
Posts: 4

Re: Regression_Plots

Do I need to mention in the above glm procedure that the model is logit (like family = "binomial" in R)? How do I see the regression curve?
New Contributor
Posts: 4

Re: Regression_Plots

Or should I use the proc logistic feature?
SAS Super FREQ
Posts: 3,307

Re: Regression_Plots

Yes, use PROC LOGISTIC. Since LOGISTIC supports the CLASS statement you can skip the call to GLMMOD and just put the categorical variables on the CLASS statement.  Add the INFLUENCE option to the MODEL statement. If you turn on ODS graphics (ODS GRAPHICS ON) and request PLOTS=ALL, you will get many diagnostic plots. The PROC LOGISTIC doc has an example that explains the diagnostic plots.

Ask a Question
Discussion stats
  • 4 replies
  • 250 views
  • 2 likes
  • 3 in conversation