BookmarkSubscribeRSS Feed
SteveDenham
Jade | Level 19

OK, I was misconstruing the subject when I calculated 78.  However, here is an approach using @sld's data that may work.  Note that since the subjects within a population are unique that the random matrix (G matrix) is all zeroes for the off-diagonal entries.  So here is what I called 'Try8';

 

title1 "Try8";
proc mixed data=test_long method=reml ;*asycov;
    ods output g=g8;
    class varname pop id;
    model y= varname;
	random pop/subject=pop*id type=un g;
    repeated varname / subject=pop*id type=un r;
    run;

The final hessian is not positive definite, so I then tried porting to PROC GLIMMIX and used the following:

 

title1 "Try9";
proc glimmix data=test_long ;*method=reml ;*asycov;
    *ods output g=g9;
    class varname pop id;
    model y= varname/ddfm=kr2;
	random pop/subject=pop*id type=un g;
    random _residual_ / subject=pop*id type=cs g;
    run;

Still reports a lot of off diagonal zeroes, and the covariances between varnames isn't modeled, so i tried the following which worked well:

 

proc glimmix data=test_long ;
    *ods output g=g9;
nloptions tech=congra;
    class varname pop id;
    model y= varname/ddfm=kr2;
	random varname/subject=pop*id type=un residual g;
    random pop/ subject=pop*id type=un(1) g;
    run;

It still reports the off-diagonal zeroes for the second random statement but I think it captures everything.

 

I am at a loss as to why the OP's data returns an infinite likelihood, and will be curious if this last approach solves that problem.

 

Steve Denham

 

 

 

 

 

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