Statalist


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

RE: st: RE: question from statalist


From   "Paley, Irina" <Irina.Paley@occ.treas.gov>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: question from statalist
Date   Thu, 9 Apr 2009 17:22:13 -0400

Just to see if it runs, I dropped all states with less than 2000 observations. Now all the SE are defined...and it doesn't look like stata drops any additional states because of multicollinearity... But it gives the same error:

. xi3: mlogit prod_type female_o ///
> fico ltv dti income loanamount loanterm ///
> ba_new f_min_arm5 t10_min_t1 e.state 
e.state           _Istate_4-53        (naturally coded; _Istate_4 omitted)

Iteration 0:   log likelihood = -72881.502
Iteration 1:   log likelihood = -55904.913
Iteration 2:   log likelihood = -49007.083
Iteration 3:   log likelihood = -47984.956
Iteration 4:   log likelihood = -47889.198
Iteration 5:   log likelihood = -47887.349
Iteration 6:   log likelihood = -47887.345
Iteration 7:   log likelihood = -47887.345

Multinomial logistic regression                   Number of obs   =     133586
                                                  LR chi2(60)     =   49988.31
                                                  Prob > chi2     =     0.0000
Log likelihood = -47887.345                       Pseudo R2       =     0.3429

------------------------------------------------------------------------------
   prod_type |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
p2     |
 female_only |  -.1555133   .0297789    -5.22   0.000    -.2138789   -.0971477
        fico |   -.000158   .0002554    -0.62   0.536    -.0006586    .0003427
         ltv |  -.0117513   .0010367   -11.34   0.000    -.0137832   -.0097195
         dti |   .0010724   .0012078     0.89   0.375    -.0012948    .0034395
      income |   .0001198   .0000953     1.26   0.209     -.000067    .0003067
  loanamount |   .0027244   .0000848    32.13   0.000     .0025581    .0028906
    loanterm |   .3048393   .0059386    51.33   0.000     .2931999    .3164787
      ba_new |   1.380727   .1570039     8.79   0.000     1.073006    1.688449
  f_min_arm5 |    3.34822   .2489538    13.45   0.000     2.860279    3.836161
  t10_min_t1 |  -.2526719   .0454174    -5.56   0.000    -.3416883   -.1636555
   _Istate_6 |   1.177903   .0375687    31.35   0.000     1.104269    1.251536
   _Istate_9 |  -.4211162   .1363362    -3.09   0.002    -.6883301   -.1539022
  _Istate_12 |   .1748989   .0508363     3.44   0.001     .0752615    .2745363
  _Istate_13 |   .0120183   .0621117     0.19   0.847    -.1097183    .1337549
  _Istate_17 |   .5266333   .0624313     8.44   0.000     .4042702    .6489965
  _Istate_20 |  -.6538387   .1589123    -4.11   0.000    -.9653011   -.3423762
  _Istate_24 |   .7937781   .0586172    13.54   0.000     .6788905    .9086657
  _Istate_25 |  -.2993312   .0892851    -3.35   0.001    -.4743268   -.1243355
  _Istate_29 |  -.6722612   .1141442    -5.89   0.000    -.8959798   -.4485427
  _Istate_32 |   .9195407   .0929692     9.89   0.000     .7373244    1.101757
  _Istate_34 |  -.5387866   .1017824    -5.29   0.000    -.7382764   -.3392967
  _Istate_36 |  -.6020304   .0828407    -7.27   0.000    -.7643951   -.4396657
  _Istate_37 |  -.2893397   .0708244    -4.09   0.000     -.428153   -.1505265
  _Istate_40 |  -.9929478   .1939296    -5.12   0.000    -1.373043   -.6128529
  _Istate_42 |  -.4063065   .1287868    -3.15   0.002     -.658724   -.1538889
  _Istate_45 |   .0057848    .082172     0.07   0.944    -.1552694    .1668389
  _Istate_47 |  -.5059151   .1443456    -3.50   0.000    -.7888274   -.2230028
  _Istate_48 |  -.7562123   .0631341   -11.98   0.000    -.8799529   -.6324718
  _Istate_51 |   .6622584   .0612535    10.81   0.000     .5422037     .782313
  _Istate_53 |   .8346187   .0676625    12.34   0.000     .7020027    .9672348
       _cons |  -13.33689   .3214546   -41.49   0.000    -13.96693   -12.70686
-------------+----------------------------------------------------------------
p3     |
 female_only |   .2520734   .0216934    11.62   0.000     .2095551    .2945916
        fico |   -.005479   .0001709   -32.06   0.000    -.0058139   -.0051441
         ltv |   .1089525   .0014794    73.65   0.000      .106053     .111852
         dti |  -.0131825   .0011063   -11.92   0.000    -.0153509   -.0110141
      income |  -.0097414   .0003657   -26.64   0.000    -.0104581   -.0090246
  loanamount |   .0053394   .0001353    39.46   0.000     .0050742    .0056046
    loanterm |    -.30474   .0031175   -97.75   0.000    -.3108501   -.2986298
      ba_new |     1.0459   .1243753     8.41   0.000     .8021284    1.289671
  f_min_arm5 |   1.399249   .1952819     7.17   0.000     1.016503    1.781994
  t10_min_t1 |  -1.661645   .0393439   -42.23   0.000    -1.738758   -1.584533
   _Istate_6 |   2.378287    .032999    72.07   0.000      2.31361    2.442964
   _Istate_9 |  -.1839164   .1083993    -1.70   0.090    -.3963751    .0285423
  _Istate_12 |   1.200839   .0346214    34.68   0.000     1.132983    1.268696
  _Istate_13 |  -.0277285   .0458872    -0.60   0.546    -.1176658    .0622087
  _Istate_17 |   .0207768   .0673345     0.31   0.758    -.1111964    .1527499
  _Istate_20 |  -2.170635   .1792299   -12.11   0.000    -2.521919   -1.819351
  _Istate_24 |   1.474792    .043018    34.28   0.000     1.390479    1.559106
  _Istate_25 |   .1024874   .0684801     1.50   0.134    -.0317311    .2367059
  _Istate_29 |  -.6156074   .0730468    -8.43   0.000    -.7587765   -.4724384
  _Istate_32 |   2.030276   .0636586    31.89   0.000     1.905507    2.155044
  _Istate_34 |   .1079523   .0672633     1.60   0.109    -.0238814     .239786
  _Istate_36 |  -.0162838   .0647249    -0.25   0.801    -.1431423    .1105746
  _Istate_37 |  -.6099104   .0532916   -11.44   0.000    -.7143601   -.5054607
  _Istate_40 |  -3.112063   .2462253   -12.64   0.000    -3.594656    -2.62947
  _Istate_42 |  -1.117306   .1131833    -9.87   0.000    -1.339141    -.895471
  _Istate_45 |  -.6461894   .0765761    -8.44   0.000    -.7962758   -.4961031
  _Istate_47 |  -1.349594   .1318826   -10.23   0.000    -1.608079   -1.091109
  _Istate_48 |  -2.136153   .0655895   -32.57   0.000    -2.264706     -2.0076
  _Istate_51 |   1.383357    .044693    30.95   0.000     1.295761    1.470954
  _Istate_53 |   1.305855   .0550159    23.74   0.000     1.198026    1.413684
       _cons |  -.8105805    .213756    -3.79   0.000    -1.229535   -.3916265
------------------------------------------------------------------------------
(prod_type==p1 is the base outcome)

  margeff
invalid syntax



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis
Sent: Thursday, April 09, 2009 12:05 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: RE: question from statalist


--- On Wed, 8/4/09, Paley, Irina  wrote:
> I use your exact code for mlogit, adapted to my dataset, and when I 
> run margeff I get that it's invalid syntax. What do you mean by 
> leaving out reference category?

Say you want to controll for gender, than there are two dummies:
male (indicating who is male) and female (indicating who is female). These two variables contain superfluous information (if you know that someone isn't male than she is probably a female).
Because of that you can't add both variables in a regression, and you need to leave one of these two out of your model. The variable you leave out is called the reference category. The same is true for your state dummies, you need to leave one of the states out. 

As you created your dummies using -xi3- this already happened, so this is not the problem. However, given that some of the state dummies have missing values on the standard errors suggests that there is still a problem with your model: you just don't have enough information in your data to add all the state dummies.
The easiest solution would be if you could find nearby states that are sort of similar to the problematic states, and merge these into "super states". So, States 50 54 2 30 46 and 72 are problematic (they either have a missing value on the standard error or they have been dropped outright due to
multiconlinearity) and asssume that state 50 is close to State 51, and state 54 to state 3 . Than you can create the "supper states" by making a copy of the variable state and use -recode-:

gen state2 = state
recode state2 (50=51) (54=3) etc.

And than you use state2 instead of state in your -mlogit- model.

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      

*
*   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   |   What's new   |   Site index