BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
oakHILLS68
Fluorite | Level 6

I'm having problems with the following GENMOD code:

proc genmod descending data=dat1;
where DV ne .;
class subjectid timepoint / param=glm;
model vitalstatus = DV  timepoint DV*timepoint / d=b type3 maxiter=100;
repeated subject=subjectid / type=cs corrw ;
estimate 'at time 0' intercept 0 &v 1 timepoint 0 0 0 0 0 0 0 0 &v*timepoint 1 0 0 0 0 0 0 0 / exp;
...
estimate 'at time 72' intercept 0 &v 1 timepoint 0 0 0 0 0 0 0 0 &v*timepoint 0 0 0 0 0 0 0 1 / exp;run;

 

My continuous dependent variable is measured at 8 time points per subject, and is highly correlated across time.  The Pearson coefficients for timepoint pairs are all in the range 0.6-0.8.

 

Even with a type = cs correlation structure, I cannot get this to work.

 

If I ignore the repeated measure aspects, this works just fine.  But what's the problem with even a simple CS structure?

 

Anyone have ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Wild guess: You have missing values at different timepoints.  If that is the case, add withinsubject=timepoint as an option to your REPEATED statement. You probably ought to analyze using PROC GEE as it is better equipped for handling missingness.

 

Wild guess 2: You have multiple measurements at the same timepoints.  Actually, this should cause a full stop of GENMOD.

 

Not so wild guess: Something other than this that we don't have enough information to go on. Things like NOTES, WARNINGS, ERRORS from the log file.  Dataset size (number of records per DV). Messages in the output file. Possible complete or quasi-separation (always something to look out for with a binomial distribution).

 

Something that might help: Get the parameter estimates from the model without the repeated measures aspect, and use those as starting values by specifying them in an INITIAL= and INTERCEPT= option.

 

SteveDenham

View solution in original post

1 REPLY 1
SteveDenham
Jade | Level 19

Wild guess: You have missing values at different timepoints.  If that is the case, add withinsubject=timepoint as an option to your REPEATED statement. You probably ought to analyze using PROC GEE as it is better equipped for handling missingness.

 

Wild guess 2: You have multiple measurements at the same timepoints.  Actually, this should cause a full stop of GENMOD.

 

Not so wild guess: Something other than this that we don't have enough information to go on. Things like NOTES, WARNINGS, ERRORS from the log file.  Dataset size (number of records per DV). Messages in the output file. Possible complete or quasi-separation (always something to look out for with a binomial distribution).

 

Something that might help: Get the parameter estimates from the model without the repeated measures aspect, and use those as starting values by specifying them in an INITIAL= and INTERCEPT= option.

 

SteveDenham

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
  • 1 reply
  • 1311 views
  • 1 like
  • 2 in conversation