BookmarkSubscribeRSS Feed
debcarl87
Calcite | Level 5

Hi there,

I am brand new to SAS (and relatively new to statistics!) and have a question concerning how to save random slopes as variables for individual subjects in my data (n=94) using proc mixed.  I have figured out how to do this for the intercepts and linear slopes but am having trouble getting estimates for the random quadratic slopes.  I have done some exploration and plottings of the longitudinal data for various subgroups in my sample and know that the fixed quadratic slope for verbal IQ is negative and significant at least for the upper 20%.  (VIQ accerated quickly at younger ages and then levels off during the teens).  But when I run the model to get the individual estimates for the random quadratic effects, either the model does not converge or I get a message that the "Estimated G matrix is not positive definite."  In the latter case, the random quadratic slopes are all predicted to be "0" (please see syntax attached).  How can I get real estimates for the random quadratic slopes?

I can send the actual data for the syntax file if needed.  Thanks so much!

Deb

4 REPLIES 4
SteveDenham
Jade | Level 19

Not sure, but I am willing to bet that the Estimated G matrix is not positive definite message is due to collinearity for some subjects, so that a separate quadratic estimate does not "come out".  Are these repeated measures?  Is there a possibility of using R side measures?  Probably not, in the context that you would like some overall distribution of quadratic slopes.  Other possibilities: standardize agedx, so that some of the collinearity between the linear and quadratic terms is lessened.

Good luck.

Steve Denham

debcarl87
Calcite | Level 5


Steve,

You're probably right about the collinearity.  I will try standardizing Age.  Thanks so much for your input!

Deb

Jeff_W
Calcite | Level 5

I haven't looked at your files, but if you're getting an estimate of '0' for the random quadratic terms, that could also simply mean that there is no individual variability around the fixed quadratic term.  Either there really is no random variability, or you don't have enough data to estimate random variability of this term. 

SteveDenham
Jade | Level 19

I think Jeff has hit the nail on the head--not enough data to estimate the random variability.  Another possibility is that the maximum likelihood estimate is actually negative, so when the standard REML estimate is computed, it comes out as a zero.  Negative estimates of random effects are almost always due to pathologies arising from insufficient data.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 4 replies
  • 1509 views
  • 0 likes
  • 3 in conversation