BookmarkSubscribeRSS Feed
lj701712
Calcite | Level 5

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.

 

 

 

2 REPLIES 2
StatDave
SAS Super FREQ

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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 418 views
  • 4 likes
  • 3 in conversation