Bookmark and Share

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]

Re: st: Outreg margins error


From   Richard Williams <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: Outreg margins error
Date   Thu, 06 Sep 2012 11:17:49 -0500

At 10:08 AM 9/6/2012, Wameq Raza wrote:
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

It would help to see the syntax of the command before margins. But in any event, your syntax implies that lntotalexp is a factor variable, which is not what you want. As the help for margins says,

        margins [marginlist] [if] [in] [weight] [, response_options options]

where marginlist is a list of factor variables or interactions that appear in the current estimation results. The variables may be typed with or without the i. prefix, and you may use any factor-variable syntax

You are including lntotalexp in the marginlist and you should only do that for factor variables.

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index