BookmarkSubscribeRSS Feed
pires
Calcite | Level 5

Hello everyone,

I am fitting a multilevel (5 levels , 3 random intercept) of longitudinal data ( binary outcome) using proc glimmix. When I test a random slope ( age) on the lowest level. I got the following message:

‘Estimated G matrix is not positive definite ‘ and the covariance parameter estimate of slope is zero.

It does mean that I don’t need the random slope age? ( that’s one of the suggestions for Proc mixed, not sure if the same applies to Proc glimmix).

Any help  would be appreciated ,


Alda

Code:

proc glimmix data=PENPIG10   method=RSPL noclprint=20 ;;

class   Age FarmID CohortID_C PenID_C PigID Nursc Envc Nursc4 Rxpc Subjpc Mortpc HthP Gender Season PenCat visit Tlw1wk_rtb;

model PigSalmCult (event='Pos')= Tlw1wk_rtb Nursc4  Mortpc

                                  Age FarmID    /solution link=logit dist=binary oddsratio ddfm=Kr; ;

nloptions tech=nrridg;;

random intercept/subject= CohortID_C;

random intercept/subject=PenID_C (CohortID_C);

random intercept Age /subject= PigID (PenID_C CohortID_C)type=VC;

covtest/wald;

Title' MT5.11.-Tlw72h_rtb Trend ';

format  Nursc Envc HthP Tlw1wk_rtb YN. Nursc4 Rxpc Subjpc Mortpc  YNM.  Gender gender. PigSalmCult Cult. Season Season. PenCat PenCat. FarmID FarmID. TNZ12h TNZ.;

run;

1 REPLY 1
xtc283
Fluorite | Level 6

Basically, this is a convergence issue in maximum likelihood estimation...most likely there is a quasi-complete separation of points where one, some or many of the values for Age fall 100% on one or the other of the values for PigSalmCult.  Try grouping Age into buckets.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 2199 views
  • 3 likes
  • 2 in conversation