Announcement

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

  • Test the equality of coefficients (mi estimate)


    Hello All,

    I want to test the equality of a coefficient (x1) in the two models using the "mi estimate" command.
    The variables are the same in the two models, but the two models use different samples (model 1 is only for male, and model 2 is only for female).

    Here is my command:

    mi estimate (diff: [est1_depress]x1 - [est2_depress]x1): mysuest "regress depress x1 x3 x4 x5 if x2==1" "regress depress x1 x3 x4 x5 if x2==2"

    x2 is sex with 1=male, 2=female.

    Is it okay to use this command for two different sample sets (male and female)?

    I appreciate your reply!




    My Stata version is Stata/MP 16.1





    Last edited by Mi Choi; 19 Jun 2022, 12:52.

  • #2
    I assume mysuest is a command you wrote yourself?

    My first impulse would be to compute interactions with x2, estimate a pooled model with the interactions, and then use mi test to test whether the interaction terms are jointly significant. This seems like a more conventional approach. Your way may work, but I don't really know especially since I don't know what mysuest is.
    -------------------------------------------
    Richard Williams
    Professor Emeritus of Sociology
    University of Notre Dame
    StataNow Version: 19.5 MP (2 processor)

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

    Comment


    • #3
      Thank you, Richard.

      I appreciate your suggestion of using the interaction term.

      I got the code, "mysuest", from this source: https://www.stata.com/support/faqs/s...-imputed-data/
      The example at the bottom of the linked page tests the coefficient on a variable from the two logistic models. In the example, two models use the same sample but different numbers of variables.

      For my study, I also compare the coefficient of a variable between two models. However, my two models include the same variables, but use different samples. I wonder if my code above can use for models with different samples.


      Comment

      Working...
      X