BookmarkSubscribeRSS Feed
marcioadg
Calcite | Level 5

This is the part of the code I used for equal variances and work fine.

model y ~ normal(L + U*(z1) + lvar, s2e);

random lvar ~ normal(0,blockvar) subject=block out=blups;

For unequal variances, I tried the one below and it outputted errors in the log.

model y ~ normal(L + U*(z1) + lvar, s2a s2b);

random lvar ~ normal(0,blockvar) subject=block out=blups;

Could you please help me identify what I am missing,

Thank you,

Marcio

4 REPLIES 4
SteveDenham
Jade | Level 19

The normal argument to the MODEL statement takes only a mean and variance.  I think you will have to code up the log likelihood function with the two variances, and use the general argument.

Steve Denham

marcioadg
Calcite | Level 5

Thank you Steve,

But I am not sure how to do that. I looked into some papers (http://www.education.umd.edu/EDMS/fac/Harring/MIsc/WUSS-Paper.pdf) and websites (SAS/STAT(R) 9.22 User's Guide) but I am not being able to do it.

Would you recommend any resource on how to do that?

Thank you,

Marcio

SteveDenham
Jade | Level 19

I have never done it, so I can't offer much beyond searching this site and the SAS-L archives.  I'm sorry.

Steve Denham

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

It is not clear what you are trying to do. I suspect you have two groups and want a different variance for each group?

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