Announcement

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

  • Comparing regression coefficients across two regression models

    Hi everyone,
    I would like to compare the regression coefficients across two regression models. When I use the svy prefix then the usual test command is not working. However, without using the svy prefix the below test command works.


    svy: regress overallsatis i.BQ4 i.BQ5 BQ1 BQ2 i.Race i.BQ6 i.BQ8 i.BQ7 ADLs i.BQ10 Help if NH_RCF==0, eform(exp(Coef.))
    eststo NH
    est store NH_RCF0

    svy: regress overallsatis i.BQ4 i.BQ5 BQ1 BQ2 i.Race i.BQ6 i.BQ8 i.BQ7 ADLs i.BQ10 Help if NH_RCF==1, eform(exp(Coef.))
    *vif
    eststo RCF
    est store NH_RCF1
    esttab NH RCF, r2 ar2 aic l title(Satisfaction NH vs. RCF)
    suest NH_RCF0 NH_RCF1


    test [NH_RCF0_mean]2.BQ4=[NH_RCF1_mean]2.BQ4
    Error: equation [NH_RCF0_mean] not found


  • #2
    After svy:regress, you don't get a separate mean model estimate. So just change NH_RCF0_mean to NH_RCF0 (and the same for NH_RCF1) and you'll get what you are looking for.

    That said, it is not correct to use -if- clauses with survey estimation commands. You can get wrong results that way. Your regression commands should look like:

    Code:
    svy, subpop(if NH_RCF == 0): regress overallsatis i.BQ4...i.BQ10, eform(exp(Coef.))
    Also, I'm curious why you want your coefficients exponentiated. There isn't anything necessarily wrong with that, but for an ordinary linear regression it's unusual. Just wondering what the circumstances are.

    Comment

    Working...
    X