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: Generalized lineal models with survey data


From   Paolina Medina <[email protected]>
To   [email protected]
Subject   Re: st: Generalized lineal models with survey data
Date   Tue, 27 Jul 2010 11:30:09 -0500

Thank you both, very much.
So this almost zero alpha, without a confidence interval can be taken
to indicate that there is no overdispersion in the model?
Here is my svyset statement and the complete output..
I am using 52 regressors (including the constant), i really dont know
how many are the design degrees of freedom... But in fact whenever i
take any of these regressors i get a lot of troubles with convergence
in the survey results (not concave or backed up) and i have to throw
away many other regressors to get convergence again.
Do you know anything i can do to fix this?
Thank you very much again in advance!!



svyset upm [weight=factor], strata(estrato)

(sampling weights assumed)

      pweight: factor
          VCE: linearized
     Strata 1: estrato
         SU 1: upm
        FPC 1: <zero>


. svy: nbreg  ncels resmay6 numradios nTVs tfijo tpaga luz ncompus
internet prim2 sec2 prepa2 normal2 tec2 pro2 m2 doc2 traba
> jadores e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13 e14 e15 e16 e17 e18 e19 e20 e21 e22 e23 e24 e25 e26 e27 e28 e29 e30 e31
> e32 estrato1 estrato2 estrato3 estrato4, log
(running nbreg on estimation sample)
note: e3 dropped due to collinearity
note: estrato2 dropped due to collinearity

Fitting Poisson model:

Iteration 0:   log pseudolikelihood =  -32297663
Iteration 1:   log pseudolikelihood =  -32264546
Iteration 2:   log pseudolikelihood =  -32264459
Iteration 3:   log pseudolikelihood =  -32264459

Fitting constant-only model:

Iteration 0:   log pseudolikelihood =  -41335387
Iteration 1:   log pseudolikelihood =  -40428544
Iteration 2:   log pseudolikelihood =  -40419335
Iteration 3:   log pseudolikelihood =  -40418972
Iteration 4:   log pseudolikelihood =  -40418972

Fitting full model:

Iteration 0:   log pseudolikelihood =  -34707498
Iteration 1:   log pseudolikelihood =  -32843264
Iteration 2:   log pseudolikelihood =  -32387977
Iteration 3:   log pseudolikelihood =  -32296994
Iteration 4:   log pseudolikelihood =  -32272196
Iteration 5:   log pseudolikelihood =  -32265972
Iteration 6:   log pseudolikelihood =  -32264708
Iteration 7:   log pseudolikelihood =  -32264488
Iteration 8:   log pseudolikelihood =  -32264465
Iteration 9:   log pseudolikelihood =  -32264460
Iteration 10:  log pseudolikelihood =  -32264459
Iteration 11:  log pseudolikelihood =  -32264459  (not concave)

Negative binomial regression                      Number of obs   =       6089
                                                  LR chi2(50)     =   1.63e+07
Dispersion           = mean                       Prob > chi2     =     0.0000
Log pseudolikelihood = -32264459                  Pseudo R2       =     0.2017

------------------------------------------------------------------------------
       ncels |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     resmay6 |  -.1189499   .0003869  -307.48   0.000    -.1197081   -.1181917
   numradios |   .0516967   .0002443   211.65   0.000     .0512179    .0521754
        nTVs |   .1765134   .0001923   918.12   0.000     .1761366    .1768902
       tfijo |  -.1133193   .0004484  -252.70   0.000    -.1141982   -.1124403
       tpaga |   .1687625   .0004486   376.22   0.000     .1678833    .1696417
         luz |   .7604265   .0046124   164.87   0.000     .7513864    .7694665
     ncompus |   .1401202   .0003325   421.45   0.000     .1394686    .1407718
    internet |  -.0047512   .0005739    -8.28   0.000    -.0058761   -.0036264
       prim2 |   .1220793   .0004182   291.90   0.000     .1212596     .122899
        sec2 |   .1243138   .0002344   530.28   0.000     .1238543    .1247733
      prepa2 |   .0985697   .0002857   344.95   0.000     .0980097    .0991298
     normal2 |  -.0754922   .0007591   -99.45   0.000      -.07698   -.0740044
        tec2 |   .0036673   .0007941     4.62   0.000      .002111    .0052236
        pro2 |   .0751997   .0004025   186.83   0.000     .0744109    .0759886
          m2 |   .0292361   .0007304    40.03   0.000     .0278046    .0306677
        doc2 |   -.160645    .002035   -78.94   0.000    -.1646335   -.1566565
trabajadores |   .1317086   .0001916   687.47   0.000     .1313331    .1320841
          e1 |   .0016872    .002384     0.71   0.479    -.0029854    .0063599
          e2 |   .0648906    .002022    32.09   0.000     .0609276    .0688537
          e4 |  -.0181868   .0026577    -6.84   0.000    -.0233957   -.0129778
          e5 |  -.1868008   .0021267   -87.83   0.000    -.1909691   -.1826324
          e6 |   .1466343   .0026388    55.57   0.000     .1414623    .1518062
          e7 |  -.3935254   .0021961  -179.20   0.000    -.3978296   -.3892212
          e8 |  -.1245181   .0020253   -61.48   0.000    -.1284877   -.1205485
          e9 |  -.2299045   .0019112  -120.29   0.000    -.2336504   -.2261585
         e10 |  -.0837978   .0022478   -37.28   0.000    -.0882033   -.0793922
         e11 |  -.3531027   .0020698  -170.60   0.000    -.3571595    -.349046
         e12 |  -.4600149     .00238  -193.28   0.000    -.4646797   -.4553501
         e13 |  -.3038531    .002392  -127.03   0.000    -.3085414   -.2991648
         e14 |   -.127427   .0019299   -66.03   0.000    -.1312096   -.1236444
         e15 |  -.3696336   .0019058  -193.95   0.000    -.3733689   -.3658982
         e16 |   -.001945   .0020393    -0.95   0.340    -.0059418    .0020519
         e17 |  -.1287652   .0023403   -55.02   0.000    -.1333522   -.1241783
         e18 |  -.1066276   .0026009   -41.00   0.000    -.1117253   -.1015299
         e19 |  -.1713326   .0019934   -85.95   0.000    -.1752395   -.1674257
         e20 |  -.3297286   .0023891  -138.02   0.000    -.3344111   -.3250461
         e21 |  -.2838858   .0020318  -139.72   0.000     -.287868   -.2799037
         e22 |  -.0790438   .0022371   -35.33   0.000    -.0834285   -.0746591
         e23 |   .1517953   .0022013    68.96   0.000     .1474808    .1561099
         e24 |  -.2631786   .0022394  -117.52   0.000    -.2675677   -.2587895
         e25 |   .0587088   .0021346    27.50   0.000     .0545251    .0628925
         e26 |   .0442961   .0020797    21.30   0.000     .0402199    .0483723
         e27 |    .165134   .0021816    75.69   0.000     .1608581    .1694098
         e28 |  -.0281822   .0020233   -13.93   0.000    -.0321478   -.0242167
         e29 |  -.6082309    .002915  -208.66   0.000    -.6139442   -.6025177
         e30 |  -.1442515   .0020102   -71.76   0.000    -.1481914   -.1403116
         e31 |   .0250986   .0022023    11.40   0.000     .0207822    .0294149
         e32 |  -.1352461   .0025166   -53.74   0.000    -.1401785   -.1303137
    estrato1 |    .189495   .0005579   339.69   0.000     .1884016    .1905883
    estrato3 |   -.322916   .0010167  -317.62   0.000    -.3249087   -.3209234
    estrato4 |   -.479242   .0008096  -591.98   0.000    -.4808287   -.4776553
       _cons |  -1.493952   .0049766  -300.19   0.000    -1.503706   -1.484198
-------------+----------------------------------------------------------------
    /lnalpha |  -23.93108          .                             .           .
-------------+----------------------------------------------------------------
       alpha |   4.04e-11          .                             .           .
------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0:  chibar2(01) =    0.00 Prob>=chibar2 = 1.000

Computing scores...

Survey results:

Survey: Negative binomial regression

Number of strata   =         4                  Number of obs      =      6089
Number of PSUs     =       837                  Population size    =  27782772
                                                Design df          =       833
                                                F(  51,    783)    =     50.61
                                                Prob > F           =    0.0000

------------------------------------------------------------------------------
             |             Linearized
       ncels |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     resmay6 |  -.1189499   .0302713    -3.93   0.000    -.1783669   -.0595329
   numradios |   .0516967    .019889     2.60   0.010     .0126581    .0907352
        nTVs |   .1765134   .0210548     8.38   0.000     .1351867    .2178402
       tfijo |  -.1133193   .0389423    -2.91   0.004    -.1897558   -.0368827
       tpaga |   .1687625   .0330961     5.10   0.000     .1038009     .233724
         luz |   .7604265   .4341484     1.75   0.080     -.091727     1.61258
     ncompus |   .1401202   .0232643     6.02   0.000     .0944567    .1857837
    internet |  -.0047512   .0434178    -0.11   0.913    -.0899725      .08047
       prim2 |   .1220793   .0353386     3.45   0.001     .0527162    .1914425
        sec2 |   .1243138   .0272578     4.56   0.000     .0708117    .1778159
      prepa2 |   .0985697   .0253691     3.89   0.000     .0487748    .1483647
     normal2 |  -.0754922   .0678928    -1.11   0.266    -.2087533    .0577689
        tec2 |   .0036673   .0752994     0.05   0.961    -.1441316    .1514662
        pro2 |   .0751997    .038429     1.96   0.051    -.0002293    .1506288
          m2 |   .0292361     .04043     0.72   0.470    -.0501205    .1085927
        doc2 |   -.160645   .0938375    -1.71   0.087    -.3448307    .0235407
trabajadores |   .1317086   .0193343     6.81   0.000      .093759    .1696583
          e1 |   .0016872   .1667689     0.01   0.992    -.3256494    .3290239
          e2 |   .0648906   .1476771     0.44   0.660    -.2249723    .3547535
          e4 |  -.0181868   .1666332    -0.11   0.913     -.345257    .3088835
          e5 |  -.1868008   .1583675    -1.18   0.239    -.4976471    .1240456
          e6 |   .1466343   .1557808     0.94   0.347    -.1591347    .4524032
          e7 |  -.3935254   .2460117    -1.60   0.110     -.876401    .0893502
          e8 |  -.1245181   .1549826    -0.80   0.422    -.4287205    .1796842
          e9 |  -.2299045   .1487182    -1.55   0.123    -.5218109     .062002
         e10 |  -.0837978   .2982255    -0.28   0.779    -.6691594    .5015639
         e11 |  -.3531027   .1536798    -2.30   0.022    -.6547479   -.0514576
         e12 |  -.4600149   .1721165    -2.67   0.008    -.7978478    -.122182
         e13 |  -.3038531   .1661254    -1.83   0.068    -.6299266    .0222204
         e14 |   -.127427   .1614396    -0.79   0.430    -.4443031    .1894491
         e15 |  -.3696336    .151954    -2.43   0.015    -.6678914   -.0713758
         e16 |   -.001945   .2189627    -0.01   0.993    -.4317284    .4278385
         e17 |  -.1287652   .1711779    -0.75   0.452    -.4647559    .2072255
         e18 |  -.1066276    .162161    -0.66   0.511    -.4249198    .2116646
         e19 |  -.1713326   .1540608    -1.11   0.266    -.4737256    .1310603
         e20 |  -.3297286   .2472161    -1.33   0.183    -.8149682     .155511
         e21 |  -.2838858   .1542873    -1.84   0.066    -.5867234    .0189518
         e22 |  -.0790438   .1822687    -0.43   0.665    -.4368038    .2787162
         e23 |   .1517953   .1548563     0.98   0.327    -.1521591    .4557498
         e24 |  -.2631786    .179553    -1.47   0.143    -.6156081    .0892509
         e25 |   .0587088    .176449     0.33   0.739    -.2876282    .4050458
         e26 |   .0442961   .1611852     0.27   0.784    -.2720808    .3606729
         e27 |    .165134    .168757     0.98   0.328    -.1661049    .4963729
         e28 |  -.0281822   .1619115    -0.17   0.862    -.3459847    .2896203
         e29 |  -.6082309   .1689908    -3.60   0.000    -.9399288   -.2765331
         e30 |  -.1442515    .190234    -0.76   0.448    -.5176458    .2291428
         e31 |   .0250986   .1760391     0.14   0.887    -.3204338    .3706309
         e32 |  -.1352461   .2260741    -0.60   0.550     -.578988    .3084957
    estrato1 |    .189495   .0642525     2.95   0.003     .0633791    .3156108
    estrato3 |   -.322916    .111296    -2.90   0.004    -.5413697   -.1044624
    estrato4 |   -.479242   .1214264    -3.95   0.000    -.7175798   -.2409043
       _cons |  -1.493952   .4622372    -3.23   0.001    -2.401239   -.5866658
-------------+----------------------------------------------------------------
    /lnalpha |  -23.93108          .                             .           .
-------------+----------------------------------------------------------------
       alpha |   4.04e-11          .                             .           .
------------------------------------------------------------------------------



On Tue, Jul 27, 2010 at 11:14 AM, Stas Kolenikov <[email protected]> wrote:
> Most likely, you run out of degrees of freedom. They should be
> reported in -svy:- output, and if you have more regressors/model
> parameters than the design d.f., you will have missing standard
> errors.
>
> On Tue, Jul 27, 2010 at 4:51 PM, Paolina Medina
> <[email protected]> wrote:
>> Thank you very much Steve for your help, in fact i have tried to run
>> the svy: nbreg command, but i am encountering some problems, i hope
>> you can help me:
>>
>> This is the regression that i run:
>>
>> svy: nbreg  ncels residents numradios nTVs dfixedphone  delectricity
>> ncompus dinternet elementary highschool phd workingpeople e1 e2 e3 e4
>> e5 e6 e7 e8 e9 e10 e11 e12 e13 e14 e15 e16 e17 e18 e19 e20 e21 e22 e23
>> e24 e25 e26 e27 e28 e29 e30 e31 e32 estrato1 estrato2 estrato3
>> estrato4, log
>>
>> I am trying to estimate coefficients for the number of cell phones in
>> mexican households using a technology specialized survey. I use some
>> socioeconomic variables, 32 dummies one for each state in mexico, and
>> 4 dummies indicating the size of the town.
>>
>> But in the first stage of the regresion, below the coefficients estimates i get:
>>
>> -------------+----------------------------------------------------------------
>>    /lnalpha |  -23.93108          .                             .           .
>> -------------+----------------------------------------------------------------
>>       alpha |   4.04e-11          .                             .           .
>> ------------------------------------------------------------------------------
>> Likelihood-ratio test of alpha=0:  chibar2(01) =    0.00 Prob>=chibar2 = 1.000
>>
>>
>> And in the survey results, below the coefficients estimates i get
>>
>> -------------+----------------------------------------------------------------
>>    /lnalpha |  -23.93108          .                             .           .
>> -------------+----------------------------------------------------------------
>>       alpha |   4.04e-11          .                             .           .
>> ------------------------------------------------------------------------------
>>
>> I understand that stata wont calculate the LR test for alpha when it
>> comes to survey data, but as you may see it is not even giving me the
>> confidence interval!
>>
>> Do you happen to know what is happening?
>>
>> Thank you very very much in advance!
>>
>> Regards!
>>
>> PM
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Jul 26, 2010 at 10:24 PM, Steve Samuels <[email protected]> wrote:
>>> In Version 9,  -svy: nbreg- and -svy: gnbreg- will work for you. Both
>>> fit generalizations of the Poisson with extra dispersion. -svy: glm-
>>> was not available until Stata 10.
>>>
>>> Steve
>>>
>>>
>>> On Mon, Jul 26, 2010 at 10:00 PM, Paolina Medina
>>> <[email protected]> wrote:
>>>> Dear statalisters,
>>>> Is it possible to perform a regression using glm with survey data in stata 9?
>>>> I have count data with overdispersion (mean 1.21, variance 1.70).
>>>> Thank you very much in advance,
>>>> PM
>>>> *
>>>> *   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/
>>>>
>>>
>>>
>>>
>>> --
>>> Steven Samuels
>>> [email protected]
>>> 18 Cantine's Island
>>> Saugerties NY 12477
>>> USA
>>> Voice: 845-246-0774
>>> Fax:    206-202-4783
>>>
>>> *
>>> *   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/
>>>
>>
>>
>>
>> --
>> Paolina Medina Palma
>>
>> *
>> *   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/
>>
>
>
>
> --
> Stas Kolenikov, also found at http://stas.kolenikov.name
> Small print: I use this email account for mailing lists only.
>
> *
> *   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/
>



-- 
Paolina Medina Palma

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