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: Outreg margins error


From   Wameq Raza <wameq.r@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Outreg margins error
Date   Thu, 6 Sep 2012 17:08:24 +0200

Dear Nick,
Thanks for the response. Yes, the lntotalexp is the natural log of
expenditure. My syntax was:

 margins tfhhh shg lntotalexp lnhhsize fem0to13 fem36to55 fem55
men0to13 men14to35 men36to55 men55 eduprim_hh edumid   ///
_hh eduhigh_hh scst dumemp_hh2 dumemp_hh3 dumemp_hh4 dumemp_hh5
dumemp_hh6 kanpur allahabad aillness1 aillness2 ail   ///
 lness4 aillness5, post

lntotalexp:  factor variables may not contain noninteger values
r(452);


Hopefully this syntax is correct following the previous response from
Carsten. I've also tried getting the margins using the same syntax
one variable at a time, but to no avail. Any suggestions?
Wameq

On Thu, Sep 6, 2012 at 2:02 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> My suggestions are:
>
> 1. The error means what it says: -lntotalexp- (presumably the log of
> total expenditure) cannot be a factor variable.
>
> 2. The error arises from incorrect syntax, but you need to show us
> _exactly_ what you typed with your data.
>
> 3. For "STATA" read "Stata" throughout.
>
> 4. Points 2 and 3 are covered by the Statalist FAQ, so you really
> should read that before re-posting.
>
> Nick
>
> On Thu, Sep 6, 2012 at 11:01 AM, Wameq Raza <wameq.r@gmail.com> wrote:
>> Dear Carsten and John,
>> Thank you so very much for the replies. As for the syntax Carsten
>> suggested, STATA gives me an error when estimating continuous
>> variables such as the ln of expenditures. The error message it gives
>> me is:
>>
>> -lntotalexp:  factor variables may not contain noninteger values-
>>
>> Any suggestions for this?
>>
> *
> *   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/



-- 
W A M E Q   R A Z A
*
*   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/


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