my model assesses the relative risk of positive_reaction (1/0) associated with therapy hours.
proc genmod data=mydata;
class id;
model positive_reaction = num_hours +other_vars /dist=poisson link=log;
output out=try predicted=p reschi=r resraw=resraw;
repeated subject=id /type=unstr;
quit;
proc sgplot data=try;
scatter x=p y=r;
scatter x=p y=resraw;
run;
i would like to create a diagnostic plot in the genmod procedure to see if this linearity relationship works, or i need to use cubic splines.
i did the scatter plot of predicted and raw residual (resraw), it shows two straight lines
if i do the scatter plot of the predicted and pearson residual (reschi), it shows two distinct curved line
but i expect to see random dots which scattered the XY plain
i might have not done the correct residual plots.
what should i suppose to do?
thanks so much.
See "Linearity in the logit (or link), testing" in the list of Frequently Asked-for Statistics (FASTats) in the Important Links section of the Statistical Procedures Community page. As suggested there, you can use the method shown in the "Nonparametric logistic regression" example in the GAMPL procedure documentation, or the ASSESS statement in GENMOD to check for linearity/adequacy of the specified form.
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.