05-20-2016 03:09 PM
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;
05-20-2016 03:48 PM
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.
05-20-2016 04:16 PM
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.
05-20-2016 04:22 PM
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.
05-20-2016 04:22 PM
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.