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: Accessing saved results from -xtmelogit- for postestimation calculations
From
Marshall Garland <[email protected]>
To
[email protected]
Subject
st: Accessing saved results from -xtmelogit- for postestimation calculations
Date
Thu, 11 Aug 2011 17:05:24 -0500
Hello-
I'm unable to use saved results from -xtmelogit- for postestimation
calculations. Results saved using -estimates save- are viewable when I
-estimates use- and replay them, but when I attempt to calculate
random effects, I get an "r(2000) no observations" error. I do not
receive the error when I save and restore estimates from -reg-. I
received the error both in Stata 12 MP for Windows and Stata 11 SE on
Unix. I suspected that it might have something to do with properly
setting the -e(sample)-, but if I include -estimates esample:- before
-predict-, I receive a "data have changed since estimation r(459);"
error.
The syntax below reproduces the error. Has anyone else received this error?
Thanks.
-Marshall
sysuse auto.dta, clear
cd "C:\Data"
gen outcome=0
replace outcome=1 in 30/74
xtmelogit outcome displacement || rep78:, variance laplace
estimates save model_1, replace
///close stata
cd "C:\Data"
estimates use model_1.ster
sysuse auto.dta, clear
gen outcome=0
replace outcome=1 in 30/74
xtmelogit
predict re, reffects level(rep78)
///now, with regress
sysuse auto.dta, clear
cd "C:\Data"
regress price foreign
estimates save model_2, replace
///close stata
cd "C:\Data"
estimates use model_2.ster
sysuse auto.dta, clear
regress
predict b
*
* 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/