Announcement

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

  • Equality of coefficients across equations: Getting "equation not found" r(303) error

    Dear all,
    I am running the same regressions in two subsamples of a larger sample, which I dichotomized using "if " option with "areg". I want to compare the coefficients of var2 in two estimations, and decide whether there is a statistically significant difference between the magnitudes of the coefficients of this variable (var2) across two subsamples.

    My regressions and Wald test command look like below:

    Code:
    qui areg y var2 var3 var4 if var5>=4,ab(var7) cluster(var1)
    estimates store highinscpALL
    
    qui areg y var2 var3 var4 if var5<4,ab(var7) cluster(var1)
    estimates store lowinscpALL
    
    test [highinscpALL]var2=[lowinscpALL]var2
    Although I checked the estimations are stored correctly (under these names), and I can replay the estimations, I cannot perform the Wald test, as I keep getting the r(303) "equation [highinscpALL] not found" error.

    I searched for answers for hours now, but I couldn't found anything that helps me. Maybe the "test" command is not suitable for my purpose, I don't know... Using the "suest" command before the "test" command did not help, and I found that "suest" is not suitable for using after "areg". I'd appreciate it greatly if anybody could help me.

    Thank you,
    SM

  • #2
    Why don't you just form interaction terms?
    Code:
    generate byte var5ge4 = var5 >= 4 if !missing(var5)
    
    areg y i.var5ge4##c.(var2 var3 var4), absorb(var7)
    test 1.var5ge4#var2

    Comment


    • #3
      Hi Joseph Coveney,

      Thank you for your response. But I cannot see how this model with interactions is equivalent to my previous model. I tried to do what you suggest. But I cannot compare this to my current model, I cannot interpret it well. Besides, F-value couldn't be computed, most probably due to the high numbers of clusters and dummies in the model.

      My dataset consists of survey data, covering 14 countries and more than 100 interviewers. I need to use interviewer dummies, country dummies, year dummies… Interacting all these variables with the dichotomy variable (var5) makes things look so complicated to me!

      I'd be grateful if I can find an explanation here.

      Kind regards,


      Note that the "greater than" and "smaller than" operators appeared false in the Code above in my first entry. It should be read as below:

      Code:
       
      qui areg y var2 var3 var4 if var5>=4,ab(var7) cluster(var1) estimates store highinscpALL qui areg y var2 var3 var4 if var5<4,ab(var7) cluster(var1) estimates store lowinscpALL test [highinscpALL]var2=[lowinscpALL]var2

      Comment


      • #4
        If there is no substantial reason (or if it's difficult to interpret or if it's too complicated) to form an interaction term of var5 and interviewer, country or year, then don't do it. If the research interest if focused on the interaction of var5 (dichotomized) and var2, then include in the model only that interaction term.
        Code:
        areg y i.var5ge4##c.var2 i.(interviewer country year), absorb(var7)
        Are interviewers crossed with country or are they nested within country?

        Comment


        • #5
          Thank you again!

          I tried your second suggestion now. It seems to be a more meaningful model without other interactions with all the dummies which I only use as control variables. Interviewer dummies are used, namely to control for the interview noise, and seem to be all insignificant. This is a big dataset with more than 100 interviewers and 6000 observations that I borrowed from other researchers, I did not controlled thoroughly (as I did not think it is relevant) whether the interviewers worked cross country. Considering the data collection method which I know well, I guess they are within country.

          When it comes to the dichotomized variable (var5 above), I already tested before whether it has an interaction with the main predictor (var2). My findings were as "no significant interaction". That is why, I also wanted to see if the coefficient of var2 (in predicting the dependent variable) is significantly different across two subsamples which are dichotomized according to var5.

          When I applied your suggestion, the Wald test (test command) yields a very high p-value, indicating there is no significant difference.

          Can I finally conclude that there is really no interaction, and no difference at all?

          Comment

          Working...
          X