Announcement

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

  • Wald test (testparm) as opposed to lrtest for comparing model fit

    Hello,

    It was suggested that I use lrtest to compare a logistic regression model with an interaction term to an otherwise identical model without the interaction term. However, I am using survey data which lrtest is not compatible with.

    Does it make sense to use a Wald test to test the significance of the interaction term after running the model? Or is this approach inappropriate for determining whether or not to include the interaction term for optimal model fit? The Wald test doesn't seem to give me any information that isn't already in the logistic regression output. If there is a more rigorous approach for comparing these models, I would like to try it.

    Here is an example of my code:

    Model 1:
    Code:
    svy, subpop(include): logistic IRToneword langcomm ieducation
    Model 2:
    Code:
    svy, subpop(include): logistic IRToneword langcomm ieducation c.langcomm#ieducation
    Test:
    Code:
    testparm c.langcomm#ieducation
    Thank you!
    Helena

  • #2
    My impression is that you think that the likelihood ratio test is in some sense "more complete" then the Wald test. The way to start thinking about this is to first explicitly formulate the null hypothesis that both tests test. The null hypothesis in both test is not something vague like "the model fits better", but in both cases that the parameter for the interaction term equals 0. So they test the same hypothesis. They differ a bit in the way they compute the test, but if both are feasible, then both will lead (asymptotically) to the same p-value. So there is no problem with using a Wald test, and in your case you have no choice.

    You are correct that the way you used testparm adds nothing to the output of logistic. Again, that is not a problem: if you perform the same test twice you should get the same result. Things don't have to be hard to be rigorous (sometimes they are, but it is not a necessity).
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank you, Maarten for your excellent response! This is very reassuring. I am happy to avoid any unnecessary coding!

      Thanks again,
      Helena

      Comment


      • #4
        I'll just note that your command is equivalent to

        Code:
        svy, subpop(include): logistic IRToneword langcomm c.ieducation c.langcomm#i.ieducation
        That is, in the same command you are treating ieducation as both continuous and categorical. If it is a 0/1 dichotomy the coefficients will not be affected. But a post-estimation command like margins might. And if ieducation is not a 0/1 dichotomy you may not be getting the results you want.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

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

        Comment

        Working...
        X