Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • No support for meqrlogit as of Stata 16

    I looked at the help file for meqrlogit in Stata 16 and it is no longer part of Stata 16. I couldn't find any alternative to it in melogit and would like to know the alternative.

    meqrlogit continues to work but, as of Stata 16, is no longer an official part of Stata.

    See melogit for a recommended alternative to meqrlogit.

  • #2
    -melogit- has the option of using the Pinheiro-Chao mode-curvature adaptive Gauss-Hermite quadrature, which I believe is method used by -meqrlogit-.

    Comment


    • #3
      I used integration method mode-curvature adaptive Gauss-Hermite quadrature (mcaghermite) but it's giving error whereas meqrlogit ran fine. Is there anything I am missing?

      Comment


      • #4
        Originally posted by gunnu singh View Post
        I used integration method mode-curvature adaptive Gauss-Hermite quadrature (mcaghermite) but it's giving error whereas meqrlogit ran fine. Is there anything I am missing?
        Yeah: Scott's post. Please re-read it.

        And then look at the help file for -melogit- where you'll find that the Pinheiro-Chao mode-curvature adaptive Gauss-Hermite quadrature method is not -mcaghermite-.

        Comment


        • #5
          Ok, I see Pinheiro-Chao mode-curvature adaptive Gauss-Hermite quadrature method in melogit but when I open help file from Stata (h melogit), this method is not defined there. However, I tried using this method and it gave error
          method pcaghermite not recognized
          .

          Comment


          • #6
            Originally posted by gunnu singh View Post
            . . . when I open help file from Stata (h melogit), this method is not defined there. However, I tried using this method and it gave error .
            That's funny; I copied and pasted the text in my post above directly from the help file for melogit. And the quadrature method works for me (see example output below—begin at the "Begin here" comment).

            You might want to check if your Stata is up-to-date. I show how to test for that, too, in the output below—see output following the comment related to checking for update status. Or you can just check by inspection after executing the command.

            .ÿ
            .ÿversionÿ16.1

            .ÿ
            .ÿclearÿ*

            .ÿ
            .ÿsetÿseedÿ`=strreverse("1574672")'

            .ÿquietlyÿsetÿobsÿ200

            .ÿ
            .ÿgenerateÿintÿpidÿ=ÿ_n

            .ÿgenerateÿdoubleÿpid_uÿ=ÿrnormal()

            .ÿ
            .ÿquietlyÿexpandÿ2

            .ÿbysortÿpid:ÿgenerateÿbyteÿtimÿ=ÿ_n

            .ÿ
            .ÿgenerateÿdoubleÿxbÿ=ÿpid_uÿ+ÿ0ÿ*ÿ(timÿ-ÿ1)

            .ÿgenerateÿbyteÿoutÿ=ÿrbinomial(1,ÿinvlogit(xb))

            .ÿ
            .ÿ*
            .ÿ*ÿBeginÿhere
            .ÿ*
            .ÿmelogitÿoutÿi.timÿ||ÿpid:ÿ,ÿintmethod(pcaghermite)ÿnolog

            Mixed-effectsÿlogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ400
            Groupÿvariable:ÿÿÿÿÿÿÿÿÿÿÿÿÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿ200

            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ2
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ2.0
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ2

            Integrationÿmethod:ÿpcaghermiteÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿIntegrationÿpts.ÿÿ=ÿÿÿÿÿÿÿÿÿÿ7

            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWaldÿchi2(1)ÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ1.16
            Logÿlikelihoodÿ=ÿ-273.58317ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.2820
            ------------------------------------------------------------------------------
            ÿÿÿÿÿÿÿÿÿoutÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
            -------------+----------------------------------------------------------------
            ÿÿÿÿÿÿÿ2.timÿ|ÿÿÿ.2336172ÿÿÿ.2171401ÿÿÿÿÿ1.08ÿÿÿ0.282ÿÿÿÿ-.1919696ÿÿÿÿÿ.659204
            ÿÿÿÿÿÿÿ_consÿ|ÿÿ-.3032607ÿÿÿ.1670008ÿÿÿÿ-1.82ÿÿÿ0.069ÿÿÿÿ-.6305762ÿÿÿÿ.0240549
            -------------+----------------------------------------------------------------
            pidÿÿÿÿÿÿÿÿÿÿ|
            ÿÿÿvar(_cons)|ÿÿÿ.7369954ÿÿÿ.4889082ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.2008143ÿÿÿÿ2.704799
            ------------------------------------------------------------------------------
            LRÿtestÿvs.ÿlogisticÿmodel:ÿchibar2(01)ÿ=ÿ3.78ÿÿÿÿÿÿÿÿProbÿ>=ÿchibar2ÿ=ÿ0.0259

            .ÿ
            .ÿ//ÿCheckÿyourÿupdateÿstatus
            .ÿquietlyÿqueryÿupdate

            .ÿforeachÿcomponentÿinÿexeÿadoÿutilitiesÿdocsÿ{
            ÿÿ2.ÿÿÿÿÿassertÿr(inst_`component')ÿ==ÿr(avbl_`component')
            ÿÿ3.ÿ}

            .ÿ
            .ÿexit

            endÿofÿdo-file


            .

            Comment


            • #7
              Seemingly, cross-posted at https://stackoverflow.com/questions/...as-of-stata-16

              Please note our policy about cross-posting which is that you should tell us about it.

              Comment


              • #8
                Originally posted by Nick Cox View Post
                Seemingly, cross-posted at https://stackoverflow.com/questions/...as-of-stata-16

                Please note our policy about cross-posting which is that you should tell us about it.
                I apologize that I missed this part of the policy. I cross-posted to get a wider audience.

                Comment


                • #9
                  Originally posted by Joseph Coveney View Post
                  That's funny; I copied and pasted the text in my post above directly from the help file for melogit. And the quadrature method works for me (see example output below—begin at the "Begin here" comment).

                  You might want to check if your Stata is up-to-date. I show how to test for that, too, in the output below—see output following the comment related to checking for update status. Or you can just check by inspection after executing the command.

                  .ÿ
                  .ÿversionÿ16.1

                  .ÿ
                  .ÿclearÿ*

                  .ÿ
                  .ÿsetÿseedÿ`=strreverse("1574672")'

                  .ÿquietlyÿsetÿobsÿ200

                  .ÿ
                  .ÿgenerateÿintÿpidÿ=ÿ_n

                  .ÿgenerateÿdoubleÿpid_uÿ=ÿrnormal()

                  .ÿ
                  .ÿquietlyÿexpandÿ2

                  .ÿbysortÿpid:ÿgenerateÿbyteÿtimÿ=ÿ_n

                  .ÿ
                  .ÿgenerateÿdoubleÿxbÿ=ÿpid_uÿ+ÿ0ÿ*ÿ(timÿ-ÿ1)

                  .ÿgenerateÿbyteÿoutÿ=ÿrbinomial(1,ÿinvlogit(xb))

                  .ÿ
                  .ÿ*
                  .ÿ*ÿBeginÿhere
                  .ÿ*
                  .ÿmelogitÿoutÿi.timÿ||ÿpid:ÿ,ÿintmethod(pcaghermite)ÿnolog

                  Mixed-effectsÿlogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ400
                  Groupÿvariable:ÿÿÿÿÿÿÿÿÿÿÿÿÿpidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿ200

                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ2
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ2.0
                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ2

                  Integrationÿmethod:ÿpcaghermiteÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿIntegrationÿpts.ÿÿ=ÿÿÿÿÿÿÿÿÿÿ7

                  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWaldÿchi2(1)ÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ1.16
                  Logÿlikelihoodÿ=ÿ-273.58317ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.2820
                  ------------------------------------------------------------------------------
                  ÿÿÿÿÿÿÿÿÿoutÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
                  -------------+----------------------------------------------------------------
                  ÿÿÿÿÿÿÿ2.timÿ|ÿÿÿ.2336172ÿÿÿ.2171401ÿÿÿÿÿ1.08ÿÿÿ0.282ÿÿÿÿ-.1919696ÿÿÿÿÿ.659204
                  ÿÿÿÿÿÿÿ_consÿ|ÿÿ-.3032607ÿÿÿ.1670008ÿÿÿÿ-1.82ÿÿÿ0.069ÿÿÿÿ-.6305762ÿÿÿÿ.0240549
                  -------------+----------------------------------------------------------------
                  pidÿÿÿÿÿÿÿÿÿÿ|
                  ÿÿÿvar(_cons)|ÿÿÿ.7369954ÿÿÿ.4889082ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.2008143ÿÿÿÿ2.704799
                  ------------------------------------------------------------------------------
                  LRÿtestÿvs.ÿlogisticÿmodel:ÿchibar2(01)ÿ=ÿ3.78ÿÿÿÿÿÿÿÿProbÿ>=ÿchibar2ÿ=ÿ0.0259

                  .ÿ
                  .ÿ//ÿCheckÿyourÿupdateÿstatus
                  .ÿquietlyÿqueryÿupdate

                  .ÿforeachÿcomponentÿinÿexeÿadoÿutilitiesÿdocsÿ{
                  ÿÿ2.ÿÿÿÿÿassertÿr(inst_`component')ÿ==ÿr(avbl_`component')
                  ÿÿ3.ÿ}

                  .ÿ
                  .ÿexit

                  endÿofÿdo-file


                  .
                  Thanks. It seems the issue is with Stata not up-to-date. The last update on my Stata was in Mar 2020 and this method was introduced after that. I have asked admin to update the Stata and hopefully, it will work.

                  Comment

                  Working...
                  X