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, is already up and running.

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

Re: st: Outreg margins error

From   Richard Williams <>
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

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?

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:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

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