BookmarkSubscribeRSS Feed
DineshK1493
Fluorite | Level 6

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;

4 REPLIES 4
Reeza
Super User

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

I may be missing something though.

DineshK1493
Fluorite | Level 6
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?
DineshK1493
Fluorite | Level 6
Or should I use the proc logistic feature?
Rick_SAS
SAS Super FREQ

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1544 views
  • 2 likes
  • 3 in conversation