Re: st: standard errors after xtmixed, predit.., fitted

Correction: I should not have included the SD for the error term, as it is not part of the fitted value.
Here's an example more like yours, but with two levels, not three. I expect that you can take it
from here
*******************************************
webuse productivity, clear
xtmixed gsp private emp hwy water other unemp || region: || state: unemp
matrix list e(b) //names of terms
scalar sd_region = exp([lns1_1_1]_cons)
scalar sd_state_u = exp([lns2_1_1]_cons)
scalar sd_state = exp([lns2_1_2]_cons)
scalar dir // check these SDs against results
predict se_fix, stdp
gen se_fitted = ///
sqrt(se_fix^2 +sd_region^2 + sd_state^2 + (unemp*sd_state_u)^2)
*******************************************
Steve
sjsamuels@gmail.com
On Dec 16, 2011, at 11:34 AM, Jennyfer Wolf wrote:
Dear Statalist,
sorry for asking the question again, but we are a bit desperate so it
would be great if anybody has a solution for my question:
Is it possible to get standard errors for the fitted values of a
multilevel-model (three levels, random slope and intercept) after
xtmixed dep_var indep_var || region1: || region2: || country :year_cat
predict var, fitted
?
We would like to present the estimated values with a confidence interval?
If it is not possible to get the standard errors for the predicted
values from Stata, is it possible to calculate these values from the
Standard Errors from the individual estimates?
Thank you very very much.
With kind regards,
Jennyfer
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/