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: xtivreg2 with margins
From
Jacob Robbins <[email protected]>
To
[email protected]
Subject
st: xtivreg2 with margins
Date
Mon, 9 Apr 2012 15:31:57 -0400
Good Afternoon,
I am having a problem running the margins command after running
xtivreg2. Interestingly enough, margins does seem to work after
xtivreg without giving an error. Here is some code that demonstrates
the problem.
sysuse bplong, replace
xtset patient
gen random = runiform()
gen random1 = runiform()
xtivreg2 bp when (random1 = random), fe
margins, atmeans eydx(random1)
Here I get the error message:
Warning: cannot perform check for estimable functions.
time variable not set, use -tsset varname ...-
r(111);
But if I use margins after xtivreg...
xtivreg bp when (random1 = random), fe
margins, atmeans eydx(random1)
I get the results and no error message. The reason I am using xtivreg2
is to use the better cluster options of xtivreg2.
Thanks for advance for your help!
Jake Robbins
Research Associate
Harvard School of Public Health
*
* 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/