BookmarkSubscribeRSS Feed
Haris
Lapis Lazuli | Level 10

Does anyone know where to find the formula SAS uses for calculating the standard error when summing the fixed model intercept and the random intercept effects for each level of the random variable in a mixed model?  It's not sqrt(SE1**2 + SE2**2 - 2*Cov12), not to mention that covariance between the fixed intercept and the random intercepts does not exist--fixed intercept is, well, fixed.

 

I can get the answer using the ESTIMATE statement but would like to do this utilizing ODS OUTPUT SolutionR dataset.

 

      ESTIMATE 'Desired Effect' Intercept 1 | Intercept 1 / subject 1 cl;

 

Thanks, Haris

7 REPLIES 7
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Matrix formulas are in SAS for Mixed Models, 2nd edition (2006). Also in Inference and Test Statistics section of the User's Guide for MIXED.THese are the general formulas for any linear combination of estimated fixed-effect parameters and random-effect predictions (such as the random effect intercept). I doubt if one could easily write out a scalar equation. It may exist somewhere.

 

By the way, the estimated fixed-effect parameter is a random variable, not a constant. So, one is dealing with the sum of two correlated random variables.

 

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_mixed_detail...

 

Haris
Lapis Lazuli | Level 10

Thanks!  I don't think I am up to matrix implementations.

 

I am puzzled by your comment about fixed-effect parameter being a random variable.  I am talking about the fixed model intercept. There is only one.  Random intercepts represent the delta from the fixed model intercept.  What I am trying to accomplish is to translate the random intercept (delta) into the outcome metric which requires to sum the fixed model intercept and the random intercept for each subject.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

What you are getting from the estimate statement in your post is the estimate (actually prediction) of the sum of the estimated fixed-effect parameter and the predicted random effect parameter. The SE determined with the statement is the square root of the variance of the sum of those two random variables. All SEs in output for fixed effects, or sum of fixed and random effects,is for the estimated fixed effects (random variables). 

 

If you knew the fixed-effect parameter with absolute certainty, it is then a constant. The SE of the sum would just be the SE for the random effect parameter estimate. This is not be requested in your estimate statement.

Rick_SAS
SAS Super FREQ

I think he means that the ESTIMATE is a random variable. Yes, the parameter is fixed, but the estimate has a distribution and you are seeing one draw from that distribution. For example, the Central Limit Theorem says that sample mean in large samples is approximately normally distributed. So the sample mean (thought of as a statistic) is a random variable.  In fact, all statistics are random variables.

Haris
Lapis Lazuli | Level 10
I'll take that as a YES 🙂
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Not sure what you mean by a "yes".

Haris
Lapis Lazuli | Level 10
A Smart Alec comment meaning that the discussion has evolved into a level beyond my needs 🙂

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
  • 7 replies
  • 1607 views
  • 3 likes
  • 3 in conversation