Announcement

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

  • Test for joint significance "variable not found"

    Hello everyone,
    Thank you for reading my post!

    I would like to test my variables for joint significance using the "test command".
    I do the following, hoping that its correct:

    1. Regress several variables on a dummy for attrition (hdum_att) twice, once for a treatment group and once for a control group
    reg hdum_att `HH_char_kont' `HH_char_dum' if treat==1
    reg hdum_att `HH_char_kont' `HH_char_dum' if treat==0

    This is part of the results I get:
    VARIABLES treatment controll
    hoh subistence farmer 0.402 0.402
    (0.012)** (0.012)**
    Female hoh -0.103 -0.103
    (0.616) (0.616)
    Number of children <15 0.039 0.039
    (0.000)*** (0.000)***
    Hoh without formal education omitted -
    Hoh with primary school -0.037 -0.037
    (0.813) (0.813)
    Share of HH owning livestock 0.445 0.445
    (0.002)*** (0.002)***


    2. I would then like to test these partly significant variables for joint significance.
    I try the following:
    test `HH_char_kont' `HH_char_dum' if treat==1
    I also tried
    test `HH_char_kont' `HH_char_dum'
    test hdum_att `HH_char_kont' `HH_char_dum' if treat==1
    test hdum_att `HH_char_kont' `HH_char_dum' if treat
    I also tried without the locals, using simply the variable names, but I always get the message that the variable cannot be found, for example:

    . test h26 BAS_hohdum_agri h16a children15_hhsize dum3 literate h110 hdum_bike hdum_moto hdum_bank_account share_food_imp share_en_imp yearlytotalexp_imp hdum_elsource h58t
    h26 not found

    The variables are all named equally and all found in the regression, so they should be fine.

    I am using Stata14.


    Could anyone help me? I am despairing...
    Thanks a lot in advance!
    Marlene

  • #2
    It's not clear why you're doing what you're doing (as opposed, say, to forming interaction terms of treatment group and all of your other variables and fitting a single logistic regression model to predict attrition), but test doesn't take if, and in your case it doesn't see that h26 among your predictors. I don't see anything like h26 among your partial display of regression coefficients; is it "head of household is a subsistence farmer"?. (By the way, all of your regression coefficients and their standard errors that you do choose to show are identical between the two treatment conditions. Are you sure everything is copacetic?)

    You don't show the list your regression table (output from regress) or display what two your local macros contain, but you should make sure that

    (1) your regress command actually saw it: type display in smcl as text "`e(cmdline)'" after fitting your model

    and

    (2) that it wasn't omitted for some reason, such as collinearity, that is, that the variable still is in your final regression table without being marked as "(empty)" or "(omitted)".

    Comment


    • #3
      Dear Joseph,
      Thank you very much for answering!

      I do the regression this way because I want to see the effects of the single variables/ see the single coefficients.
      I copied twice the results for the treatment group, sorry for that, thats why the coefficients and se were all the same.
      Yes, h26 was the subsistence farmer variable. I had to mistakes in there, one was - as you said - that I used the if specification and one was, that the dependent variable was among my variables in the test.

      So, its all solved.
      Thank you very much!
      Marlene

      Comment

      Working...
      X