Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: results from Papke/Wooldridge glm


From   "Daw, Christina M" <[email protected]>
To   <[email protected]>
Subject   st: results from Papke/Wooldridge glm
Date   Fri, 29 Jun 2007 15:53:52 -0500

Thanks again to Jeff Pitblado for providing the suggestions below for running a glm model (Papke and Wooldridge method for use with a proportion as a dependent variable).  Using the Stata 9 suggestion, however, I get some strange results, unless I'm looking at the wrong results.  

"In Stata 10, -glm- supports the -svy- prefix.

In Stata 9, Christina can use -glm- with -iweight-s followed by -suest- with
the -svy- option.  Here is an example,

***** BEGIN:
webuse nhanes2f
svyset psuid [pw=finalwgt], strata(stratid)
glm loglead age female [iweight=finalwgt]
suest ., svy
***** END:

This will work with any family/link combination that is allowed by the -glm-
command. "

Results below (sorry for so much output): 
1. 
.glm pcoop evtime [iweight=perwt] if officemh==1, link(logit) family(binomial) robust
note: pcoop has non-integer values

excerpt
Iteration 2:   log pseudolikelihood = -3.345e+08  

Generalized linear models                          No. of obs      =     45278
Optimization     : ML                              Residual df     =     45276
                                                   Scale parameter =         1

Variance function: V(u) = u*(1-u/1)                [Binomial]
Link function    : g(u) = ln(u/(1-u))              [Logit]

                                                   AIC             =  14776.26
Log pseudolikelihood =   -334519688                BIC             =  4.79e+08

------------------------------------------------------------------------------
             |               Robust
       pcoop |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      evtime |  -.0030841   .0002791   -11.05   0.000     -.003631   -.0025371
       _cons |  -.0196169   .0182409    -1.08   0.282    -.0553683    .0161345
------------------------------------------------------------------------------

. suest . , svy 

Survey results for .

Number of strata   =       125                  Number of obs      =     45278
Number of PSUs     =       361                  Population size    = 5.513e+08
                                                Design df          =       236

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pcoop        |
      evtime |  -.0030841   16.38178    -0.00   1.000    -32.27629    32.27012
       _cons |  -.0196169    1266.51    -0.00   1.000    -2495.128    2495.089
------------------------------------------------------------------------------

2. . glm pcoop evtime [iweight=perwt] if officeadultmh==1, link(logit) family(binomial) robust
note: pcoop has non-integer values


Iteration 2:   log pseudolikelihood = -2.641e+08  

Generalized linear models                          No. of obs      =     34758
Optimization     : ML                              Residual df     =     34756
                                                   Scale parameter =         1
Deviance         =  381457013.4                    (1/df) Deviance =  10975.29
Pearson          =  290464308.7                    (1/df) Pearson  =  8357.242

Variance function: V(u) = u*(1-u/1)                [Binomial]
Link function    : g(u) = ln(u/(1-u))              [Logit]

                                                   AIC             =  15194.28
Log pseudolikelihood =   -264061390                BIC             =  3.81e+08

------------------------------------------------------------------------------
             |               Robust
       pcoop |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      evtime |   -.004174   .0003139   -13.30   0.000    -.0047891   -.0035588
       _cons |   .1200881   .0205699     5.84   0.000     .0797719    .1604043
------------------------------------------------------------------------------


. suest ., svy

Survey results for .

Number of strata   =       125                  Number of obs      =     34758
Number of PSUs     =       360                  Population size    = 4.329e+08
                                                Design df          =       235

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pcoop        |
      evtime |   -.004174          .        .       .            .           .
       _cons |   .1200881          .        .       .            .           .
------------------------------------------------------------------------------

Is there something I may have done in error?  Any information would be helpful.  

Sincerely,
Chris 



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index