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;
If your dependent variable is 0/1 why aren't you using logistic regression?
I may be missing something though.
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.