Hi
I need to plot two plots one for deviance residuals versus predicted values and the other for probability plot of deviance residual. Could you please help me with that. below is my code
data prog;
input x1 x2 x3 x4 y;
datalines;
0 0 0 0 12.60
1 0 0 0 18.70
0 1 0 0 3.28
1 1 0 0 3.44
0 0 1 0 4.98
1 0 1 0 5.70
0 1 1 0 9.97
1 1 1 0 9.07
0 0 0 1 2.07
1 0 0 1 2.44
0 1 0 1 4.09
1 1 0 1 4.53
0 0 1 1 7.77
1 0 1 1 9.43
0 1 1 1 11.75
1 1 1 1 16.30
proc genmod;
model y = x1 x2 x3 x4/ dist =gamma link = log type1 type3;
run;
ods graphics on;
proc genmod plots=all PLOTS=PREDICTED
PLOTS=(PREDICTED RESCHI)
PLOTS(UNPACK)=DFBETA;
model y = x1 x2 x3 x4;
run;
could you please help me modify my code as i tried different scenarios and it didn't show me these plots
using this code , I got the plot of deviance residual versus observation but I need the second probability plot
data rate;
input x1 x2 x3 x4 rate;
datalines;
0 0 0 0 12.60
1 0 0 0 18.70
0 1 0 0 3.28
1 1 0 0 3.44
0 0 1 0 4.98
1 0 1 0 5.70
0 1 1 0 9.97
1 1 1 0 9.07
0 0 0 1 2.07
1 0 0 1 2.44
0 1 0 1 4.09
1 1 0 1 4.53
0 0 1 1 7.77
1 0 1 1 9.43
0 1 1 1 11.75
1 1 1 1 16.30
proc genmod;
model rate = x1 x2 x3 x4/ dist =gamma link = log type3 ;
run;
ods graphics on;
proc genmod data=rate plots(unpack)=all;
model rate=x1 x2 x3 x4/dist=gamma link=log type1 typ3;
run;
ods graphics on;
proc genmod data=rate plots=resdev;
model rate=x1 x2 x3 x4/dist=gamma link=log type1 typ3;
run;
I am beginner in SAS, could you elaborate more where should I write this in my code
and how can I get the pp plot for deviance residuals
proc genmod data = prog plots;
model rate=x1 x2 x3 x4/dist=gamma link=log type1 typ3;
output out=want predicted=p;
run;
proc PROC UNIVARIATE data=want;
plot=pplot;
run;
This doesn't work for me could you please modify it
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.