Announcement

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

  • test for heteroskedasticity in logit/ probit models

    Dear all,
    I am conducting research which involves a logit model and a probit model.
    How can I test for heteroskedasticity in logit/ probit models? is Lagrange Multiplier test a god test?
    Thanks a lot for your help.
    Anne


    Kath Posts: 2 Joined: Tue Jan 06, 2015 4:08 am

  • #2
    Actually, the variable addition version of the LM test is even easier. In Section 15.5.3 of "Econometric Analysis of Cross Section and Panel Data," MIT Press, 2010, 2e, I suggest the following procedure (for probit, but it also works for logit):

    1. Estimate the model by standard probit (or logit). Obtain the fitted linear indices, x(i)*bhat.
    2. Estimate an augmented model by probit or logit. Include the original variables x(i) and then [x(i)*bhat]*x1(i), where x1(i) is the subset of x(i) in the heteroskedastic function. (At a minimum, x1(i) does not include a constant.) Then test the joint significance of the interactions using the standard Wald test for exclusion restrictions. The code below assumes all non-constant covariates appear in the variance function:

    Code:
    probit y x1 x2 ... xK
    predict xbhat, index
    probit y x1 x2 ... xK c.xbhat#c.x1 c.xbhat#c.x2 ... c.xbhat#c.xK
    test c.xbhat#c.x1 c.xbhat#c.x2 ... c.xbhat#c.xK
    Alternatively, in the probit case you can use the hetprobit command to estimate the model with heteroskedasticity. Stata provides the LR statistic.

    Code:
    hetprobit y x1 x2 ... xK, het(x1 x2 ... xK)

    Comment


    • #3
      Thanks in advance. The procedures that you suggest (in order to implement the LM test) detect if there is heteroskedasticity.
      But, in fact, if there is heteroskedasticity how can I correct it?

      Comment


      • #4
        Richard Williams' -oglm- (-findit -oglm-) provides a well-documented and versatile command for modeling heteroskedasticity in an ordinal response (including implicitly binary).

        Regards, Mike

        Comment


        • #5
          Thanks, Mike. hetprobit does the trick, too, but it does assume probit. (The difference between logit and probit is likely to be small in my experience.)

          Comment


          • #6
            With a binary dv it is a tossup between oglm and hetprobit; in fact I would probably use hetprobit if I didn't need all the extra features oglm offers. But oglm also works with ordinal dependent variables.
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            Stata Version: 17.0 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              Agree with both Rich and Jeff. One reason I pointed to -oglm- is that, if I recall correctly, the cited literature in its help file points to some questions about how well het. logit models work in practice. I believe one sources claims small problems in the variance specification can lead to worse problems than would occur with a "regular" logit model.

              Regards, Mike

              Comment


              • #8
                Thanks a lot but it was not completely clear for me the using of the hetprobit command.
                My question is: hetprobit tests if there is heteroskedasticity ( this is, it is a command that allows to detect heteroskedasticity) or it solves/ corrects the heteroskedasticity problem (this is, in the presence of heteroskedasticity it allows the correct estimation of the parameters)?

                Comment


                • #9
                  Anne: It does both. Give it a try and you'll see it estimates two sets of parameters, the second being in the variance function. So you have the full set of estimates, and Stata also provides the chi-square statistic. I'm pretty sure it won't harm your computer. :-)

                  Comment


                  • #10
                    Professor Wooldridge,
                    Many thanks! I've tried with an example and I got the following output:

                    hetprobit cardhldr age income, het( age income) nolog



                    Heteroskedastic probit model
                    Number of obs = 13444
                    Zero outcomes = 2945
                    Nonzero outcomes = 10499

                    Wald chi2(2) = 81.42
                    Log likelihood = -6864.233 Prob > chi2 = 0.0000

                    ------------------------------------------------------------------------------
                    cardhldr | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    cardhldr |
                    age | -.0022684 .0028405 -0.80 0.425 -.0078357 .0032989
                    income | .0007098 .0000934 7.60 0.000 .0005268 .0008928
                    _cons | -.260187 .1480461 -1.76 0.079 -.550352 .0299781
                    -------------+----------------------------------------------------------------
                    lnsigma2 |
                    age | .0004549 .0026616 0.17 0.864 -.0047618 .0056716
                    income | .0001901 .0000186 10.20 0.000 .0001536 .0002266
                    ------------------------------------------------------------------------------
                    Likelihood-ratio test of lnsigma2=0: chi2(2) = 82.89 Prob > chi2 = 0.0000


                    So, as Prob > chi2 = 0.0000 I reject the null and so the model has heteroskedasticity or in other words heteroskedasticity is a problem in the model. This means that I will use the estimates obtained by this way (first set of parameters) and not those obtained using the probit command. I'm correct?

                    Comment


                    • #11
                      Yes, correct -- but I would still report the probit results. With such a large sample size it is not surprising you find statistical significance. You should compute the average marginal effects using both probit and hetprobit. You also might want to try some other functional forms, such as log(income), a quadratic in age (so age and c.age#c.age), and maybe interactions between age and log(income). You certainly have enough data.

                      Comment


                      • #12
                        Thanks again. I will do what you suggest.
                        An additional question, please:
                        In the case of a logit model I can detect heteroskedasticity using the code that you suggest in your first post but how can I solve/ correct the heteroskedasticity problem in a logit model (as in this type of model there isn't a command like hetprobit for probit models)? I have to use the oglm command?

                        Comment


                        • #13
                          Is this for your own research? If so, then I'm not sure why you insist on using both the probit and logit models. I seriously doubt whether logit will give you much different answers. If you do want to use logit then, yes, short of programming it up yourself, you need to use the oglm command.

                          Comment


                          • #14
                            Beware that apparent heteroskedasticity can actually be the result of an incorrect functional form of one or more of your explanatory variables. In your example you included both age and income linearly, and both are classic examples of variables where you would expect a non-linear effect. So, before I would run a hetprobit I would spent quite a lot of time ensuring myself that all variables enter the model correctly.
                            ---------------------------------
                            Maarten L. Buis
                            University of Konstanz
                            Department of history and sociology
                            box 40
                            78457 Konstanz
                            Germany
                            http://www.maartenbuis.nl
                            ---------------------------------

                            Comment


                            • #15
                              Many thanks. But if after I ensuring myself that all variables enter the model correctly, I run the hetprobit command and I conclude that heteroskedasticity is a problem in my model. Should I run the hetprobit command with the vce(robust) option?

                              Comment

                              Working...
                              X