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: suest and factor coding


From   Tim Wade <wadetj@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: suest and factor coding
Date   Fri, 17 Dec 2010 15:43:30 -0500

Michael, thanks. Tim


On Fri, Dec 17, 2010 at 1:53 PM, Michael N. Mitchell
<Michael.Norman.Mitchell@gmail.com> wrote:
> Dear Tim
>
>  Jeff Pitplado of Stata answered this question recently, see
>
> http://www.stata.com/statalist/archive/2010-12/msg00235.html
>
> Best regards,
>
> Michael N. Mitchell
> Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
> A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
> Stata tidbit of the week         - http://www.MichaelNormanMitchell.com
>
>
>
> On 2010-12-17 9.25 AM, Tim Wade wrote:
>>
>> 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/
>
> *
> *   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/
>

*
*   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