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]

st: suest and factor coding


From   Tim Wade <[email protected]>
To   [email protected]
Subject   st: suest and factor coding
Date   Fri, 17 Dec 2010 12:25:38 -0500

Hi Statalist,

I am using Stata V 11.1 SE, Windows XP

I have run across an issue with -suest- in Version 11 with the new
factor coding.  Basically, I get the error "too many base levels
specified" when I try to "suest" models that share the same factor
variable, but include different values of the factor variable. When I
revert to the old "xi" syntax, the models can be combined with -suest-
as expected.  I can recreate this problem with the following example:

sysuse auto.dta
xtile pricecat=price, nq(4)
logistic  foreign trunk headroom i.pricecat if pricecat<=2
est store m1
logistic  foreign trunk headroom  mpg  i.pricecat if pricecat>2
est store m2
suest m1 m2
*error produced "too many base levels specified"
xi: logistic  foreign trunk headroom i.pricecat if pricecat<=2
est store m3
xi: logistic  foreign trunk headroom mpg i.pricecat if pricecat>2
est store m4
suest m3 m4
*suest produces following results:

Simultaneous results for m3, m4

                                                  Number of obs   =         74

------------------------------------------------------------------------------
             |               Robust
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
m3_foreign   |
       trunk |  -.1917506   .2408272    -0.80   0.426    -.6637633     .280262
    headroom |   .1620987    .842212     0.19   0.847    -1.488607    1.812804
_Ipricecat_2 |   .3446382   .7647411     0.45   0.652    -1.154227    1.843503
_Ipricecat_3 |  (omitted)
_Ipricecat_4 |  (omitted)
       _cons |   .2902781   1.124931     0.26   0.796    -1.914546    2.495102
-------------+----------------------------------------------------------------
m4_foreign   |
       trunk |  -.5303469   .2455778    -2.16   0.031     -1.01167   -.0490233
    headroom |   .2068252   .7818994     0.26   0.791    -1.325669     1.73932
         mpg |   .1186309   .0674696     1.76   0.079    -.0136071    .2508688
_Ipricecat_2 |  (omitted)
_Ipricecat_3 |  -.4138492   1.126895    -0.37   0.713    -2.622524    1.794825
_Ipricecat_4 |  (omitted)
       _cons |   4.712297   4.920069     0.96   0.338    -4.930861    14.35545
------------------------------------------------------------------------------

Anyone have an idea why -suest- cannot combine models with the new
factor variable coding? Am I making an error, or cound this be
intentional? Otherwise is it a bug?

Many thanks. Tim
*
*   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