Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Error message when trying to regression model with eststo prefix.


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Error message when trying to regression model with eststo prefix.
Date   Mon, 11 Feb 2013 13:58:40 +0100

On Mon, Feb 11, 2013 at 1:38 PM, Amal Khanolkar wrote:
> I'm trying to run the regression model below. I get an error message that says 'factor variables' not allowed.
>
> This is quite strange, given that I ran the exact same regression model last week and had no problems! Can anyone tell me what's going wrong?
>
> . eststo: xi: logistic verypreterm i.ethnicity2 sex byear ib3.magecat i.parity if education!=. & famsit_new2!=. & smoke1!=. & multibirth==1, vce (robust)

It seems that you have two problems:

1) you are mixing -xi:- syntax with factor variable syntax, this is
obviously a very bad idea. The easiest solution is just leave the
-xi:- prefix away and all should work as planned.

2) You have an outdated version of -estout-. So typing in Stata: -ssc
install estout, replace- should solve that problem. The following
works just fine for me:

*------------------ begin example ------------------
sysuse auto, clear
recode rep78 1/2=3
eststo: logit foreign i.rep78##c.trunk turn
esttab
*------------------- end example -------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index