Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Confidence intervals after -xtmixed-
From
"P. Praeg" <[email protected]>
To
[email protected]
Subject
st: Confidence intervals after -xtmixed-
Date
Mon, 24 Mar 2014 19:01:23 +0100
Dear all:
I am interested in obtaining confidence intervals for the sum of the
empirical Bayes residuals plus the overall regression coefficient after
fitting a random effects model.
Specifically, I'm fitting a model similar to this one:
use http://www.stata-press.com/data/r12/pig, clear
xtmixed weight week || id: week, var cov(uns)
I am predominately interested in the slope variation of "week." So doing
this:
predict BLUP*, reffects
predict BLUPse*, reses
gives me the id-specific residuals and their standard errors
for the intercept and the slope of "week."
This way, I can e.g. obtain a "caterpillar plot" for the id-specific
slope residuals of "week":
serrbar BLUP1 BLUPse1 id, yline(0) scale(1.96)
This is close to what I want, but not exactly.
What I want is a plot like this:
gen weekeffect = _b[week] + BLUP1
graph dot weekeffect, over(id) vertical
but then with confidence intervals.
My question now is: Is there a straight forward (and correct) way in
Stata to obtain a standard error for the sum of _b[week] and BLUP1?
Thank you for your consideration!
Patrick
--
Patrick Präg
ICS/Department of Sociology
Faculty of Social and Behavioral Sciences
University of Groningen
Grote Rozenstraat 31
9712 TG Groningen, The Netherlands
Tel: +31 (0)50 363 7620
Email: [email protected]
http://www.rug.nl/staff/p.praeg
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/