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: margins command gives "not estimable"


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: margins command gives "not estimable"
Date   Wed, 23 Jan 2013 10:32:49 +0100

You still have the same problem as yesterday. In your example the
variable agegroup has three categories 1, 2, and 3. If you type i(1
2)b1.agegroup you are in effect merging category three with the
baseline category. It is legal, but almost certainly not what you
want.

Instead you must either exclude all observations from your model that
belong to the categories you want to exclude or create a new
categorical variale where you merged the categories you want to merge.

So in your example:

// either exclude all observations belonging to agegroup == 3
webuse margex
mlogit outcome i.sex ib1.agegroup if agegroup != 3

// or merge category 3 with category 2
gen agegroup2 = agegroup
replace agegroup2 = 2 if agegroup2 == 3
mlogit outcome i.sex ib1.agegroup

-- Maarten

On Wed, Jan 23, 2013 at 9:17 AM, Saki Tapsell <[email protected]> wrote:
> Hi all,
>
>  Some example code:
>
> webuse margex
> mlogit outcome i.sex i(1 2)b1.agegroup
> margins, dydx(*)
>
> This fails saying "not estimable" for all the data.
>
> In my specific case, I have 19 sectors but only want to use 15 of the
> sectors in mlogit and margins.
>
> Anyone know of a way to solve this please?
>
> Thank you very much,
>
> Saki Tapsell
> *
> *   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/



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