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: meglm


From   Alfonso Sanchez-Penalver <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: meglm
Date   Wed, 16 Oct 2013 12:17:49 -0400

Hi Stas,

Thanks for your answer. If that's the reason, and I'll test it tonight running -meprobit- to see if yields the same results, then it saddens me that there is no official command in Stata to estimate a multilevel fractional response model. I was hoping I could use -meglm- instead of -xtprobit- or -meprobit- for that matter, in a similar way that we can use -glm- instead of -probit- for fractional responses.

Does anyone know of a user-written command that would allow the estimation of a multi-level mixed fractional response probit model?

Thanks,

Alfonso Sánchez-Peñalver

> On Oct 16, 2013, at 11:39 AM, Stas Kolenikov <[email protected]> wrote:
> 
> If this is a fractional response, then -meglm- is probably using the
> convention of -probit- that a zero is a zero, and everything else is a
> one. The likelihood of 0 indicates exactly that. -probit- gets around
> it with a complicated heuristics of perfect prediction; -meglm- may or
> may not be doing that, and numeric integration just blurs the things
> by less-than-perfect calculation of the likelihood.
> 
> 
> -- Stas Kolenikov, PhD, PStat (ASA, SSC)
> -- Senior Survey Statistician, Abt SRBI
> -- Opinions stated in this email are mine only, and do not reflect the
> position of my employer
> -- http://stas.kolenikov.name
> 
> 
> 
> On Wed, Oct 16, 2013 at 7:17 AM, Alfonso Sanchez-Penalver
> <[email protected]> wrote:
>> I forgot to mention that ysm is a fractional response variable, which is why I'm trying -meglm- instead of -meprobit-.
>> 
>> Alfonso Sánchez-Peñalver
>> 
>>> On Oct 16, 2013, at 8:00 AM, Alfonso S <[email protected]> wrote:
>>> 
>>> Hi,
>>> 
>>> I am trying to get my head around using the -meglm- command in Stata 13 for the mac, and I must be doing something wrong. The following are the results I get when running it:
>>> 
>>> ----------------------------------------------
>>> . meglm ysm ldis_totcurexpppa sch_enrlunsh lsch_enrtotal y_dum2 y_dum3 y_dum4 y_dum5 y_dum6 y_dum7 y_dum8 mldis_totcurexppp mlunch mlenrol || sprp_sch:, covariance(exchangeable) family(binomial) link(probit)
>>> 
>>> Fitting fixed-effects model:
>>> 
>>> Iteration 0:   log likelihood = -2347.0075
>>> Iteration 1:   log likelihood =          0
>>> Iteration 2:   log likelihood =          0
>>> 
>>> Refining starting values:
>>> 
>>> Grid node 0:   log likelihood = -8.835e-06
>>> 
>>> Fitting full model:
>>> 
>>> Iteration 0:   log likelihood = -8.835e-06  (not concave)
>>> Iteration 1:   log likelihood = -1.147e-12
>>> Iteration 2:   log likelihood = -1.142e-12
>>> 
>>> Mixed-effects GLM                               Number of obs      =      6856
>>> Family:                binomial
>>> Link:                    probit
>>> Group variable:        sprp_sch                 Number of groups   =       857
>>> 
>>>                                                Obs per group: min =         8
>>>                                                               avg =       8.0
>>>                                                               max =         8
>>> 
>>> Integration method: mvaghermite                 Integration points =         7
>>> 
>>>                                                Wald chi2(0)       =         .
>>> Log likelihood = -1.142e-12                     Prob > chi2        =         .
>>> -----------------------------------------------------------------------------------
>>>              ysm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
>>> ------------------+----------------------------------------------------------------
>>> ldis_totcurexpppa |  -.6370373          .        .       .            .           .
>>>     sch_enrlunsh |   3.177517          .        .       .            .           .
>>>    lsch_enrtotal |   .0229953          .        .       .            .           .
>>>           y_dum2 |    .699251          .        .       .            .           .
>>>           y_dum3 |   .8369304          .        .       .            .           .
>>>           y_dum4 |   .7515347          .        .       .            .           .
>>>           y_dum5 |   .6936224          .        .       .            .           .
>>>           y_dum6 |   .6023263          .        .       .            .           .
>>>           y_dum7 |   .6499135          .        .       .            .           .
>>>           y_dum8 |   .6696426          .        .       .            .           .
>>> mldis_totcurexppp |   .3410811          .        .       .            .           .
>>>           mlunch |   6.249509          .        .       .            .           .
>>>          mlenrol |   .0017366          .        .       .            .           .
>>>            _cons |   12.76935          .        .       .            .           .
>>> ------------------+----------------------------------------------------------------
>>> sprp_sch          |
>>>        var(_cons)|   .5950633          .                             .           .
>>> -----------------------------------------------------------------------------------
>>> LR test vs. probit regression:       chi2(0) =     0.00   Prob > chi2 =      .
>>> 
>>> Note: LR test is conservative and provided only for reference.
>>> -----------------------------------------------
>>> 
>>> To see that the variables were doing fine I ran the -xtgee- estimation and got normal results
>>> -----------------------------------------------
>>> 
>>> . xtgee ysm ldis_totcurexpppa sch_enrlunsh lsch_enrtotal y_dum2 y_dum3 y_dum4 y_dum5 y_dum6 y_dum7 y_dum8 mldis_totcurexppp mlunch mlenrol, family(binomial) link(probit) corr(exch)
>>> 
>>> Iteration 1: tolerance = .21314375
>>> Iteration 2: tolerance = .00124994
>>> Iteration 3: tolerance = .00001481
>>> Iteration 4: tolerance = 3.957e-07
>>> 
>>> GEE population-averaged model                   Number of obs      =      6856
>>> Group variable:                   sprp_sch      Number of groups   =       857
>>> Link:                               probit      Obs per group: min =         8
>>> Family:                           binomial                     avg =       8.0
>>> Correlation:                  exchangeable                     max =         8
>>>                                                Wald chi2(13)      =    113.63
>>> Scale parameter:                         1      Prob > chi2        =    0.0000
>>> 
>>> -----------------------------------------------------------------------------------
>>>              ysm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
>>> ------------------+----------------------------------------------------------------
>>> ldis_totcurexpppa |   .2161359   .3463714     0.62   0.533    -.4627396    .8950114
>>>     sch_enrlunsh |  -.0725626   .2464216    -0.29   0.768    -.5555401    .4104148
>>>    lsch_enrtotal |  -.0349141   .1043114    -0.33   0.738    -.2393606    .1695323
>>>           y_dum2 |  -.1418307   .0822838    -1.72   0.085    -.3031039    .0194425
>>>           y_dum3 |  -.2154219   .0750023    -2.87   0.004    -.3624236   -.0684201
>>>           y_dum4 |  -.1581733   .0651644    -2.43   0.015    -.2858932   -.0304533
>>>           y_dum5 |  -.1202846   .0596719    -2.02   0.044    -.2372394   -.0033298
>>>           y_dum6 |  -.0590736   .0576424    -1.02   0.305    -.1720506    .0539034
>>>           y_dum7 |  -.0919327   .0537733    -1.71   0.087    -.1973266    .0134611
>>>           y_dum8 |  -.1063621   .0504099    -2.11   0.035    -.2051636   -.0075606
>>> mldis_totcurexppp |  -.0413327   .4116867    -0.10   0.920    -.8482237    .7655583
>>>           mlunch |  -1.001581   .2810579    -3.56   0.000    -1.552444   -.4507177
>>>          mlenrol |   .0000284   .0003227     0.09   0.930    -.0006039    .0006608
>>>            _cons |  -.3508665   2.187324    -0.16   0.873    -4.637943     3.93621
>>> -----------------------------------------------------------------------------------
>>> 
>>> ---------------------------------------------------------------------------------------
>>> 
>>> Can someone tell me if I am specifying the meglm command wrong? If not, why does it not reproduce the results from xtgee?
>>> 
>>> Thanks,
>>> 
>>> Alfonso.
>>> 
>>> 
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index