Announcement

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

  • Problem testing models

    I have to answer this for my MicroData paper: Do reported wages vary by month? If so, would it be enough to control for variation by quarter of the year?
    I did
    gen quarter = ceil(month/3)
    reg lnwage i.quarter c.age##c.age i.wbhaom forborn forborn_old married ownchild unmem multjob rural centcity suburb i(8/16).educ92 i.occ_m03 uhourse, robust
    estimate store model1
    reg lnwage i.month i.quarter c.age##c.age i.wbhaom forborn forborn_old married ownchild unmem multjob rural centcity suburb i(8/16).educ92 i.occ_m03 uhourse, robust
    estimate store model2
    test model1=model2


    But I keep getting r(111) model1 not found, also for model2 not found, but if I estimate tab and both models are stored.
    What can I do?
    Thanks in advanced.

  • #2
    exactly what do you aim to test with

    test model1 = model2

    ?

    Comment


    • #3
      If including only indicators for the quarter of the year adequately captures the variation in reported wages compared to including indicators for each month.

      Comment


      • #4
        test model1 = model2 is not a legitimate command. Besides, the two models are obviously not identical, which is what you are asking (though Stata has no idea what you are asking).

        there is the option for nested models
        Code:
        lrtest model1 model2
        but "robust" precludes its use.


        having i.month and i.quarter is redundant (when month precedes quarter in the variable list). the quarter coefficients will be omitted. omit i.quarter in model2.

        Two simple ways you could choose between the two:
        1. compare the Adjusted R2. (Since DV is the same, this is legit)
        2. compare the AIC/BIC (estat ic after you estimate). the smaller the better.

        This might work too. Order i.quarter before i.month in model2 (note the difference in the results between the ordering), then after the regression run
        testparm i.month

        If you reject, then use month. This is asking whether the month fixed effects differ within a quarter.

        You might also do for model1 and model2 (the latter absent i.quarter)

        Code:
        testparm i.quarter
        testparm i.month
        just to see if you need the FE at all.

        All said, if the data is monthly, I'd use monthly fixed effects. you might use
        Code:
        reghdfe y x1 x2, absorb(month) vce(robust)
        to estimate the model and absorb the fixed effects.

        Comment

        Working...
        X