Announcement

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

  • Variables not working together

    Hello,

    I am relatively new to Stata and I am trying to run a regression and my whitedummy variable (which consist of 1 for white ethnicity and 0 for rest of the ethnicities ) and my experience variable which is made by age minus edage1 (age completed full time education) but the data is always off when I put them together. I ran independent regressions with the rest of the variables and they seem to be fine looking at the t statistic but when I run these together the results do not come out right. My dependant variable is grsswk which is gross weekyly earning
    I have attached the regressions as images. Below is my code

    gen whitedummy = (ethnic==1)
    replace whitedummy = . if ethnic ==9

    gen log_whitedummy = log(whitedummy)
    gen ln_whitedummy = ln(whitedummy)

    gen age2=age^2

    gen manage1 = manage
    replace manage1 = . if manage ==-9
    replace manage1= . if manage ==-8


    gen edage1 = edage
    replace edage1 = . if edage==-9
    replace edage1 = . if edage==-8
    replace edage1 = . if edage==96
    replace edage1 = . if edage==97


    gen mangerdummy = (manage1==1)
    gen supervisordummy = (manage1==2)
    gen notmanagersupervisordummy = (manage1==3)


    replace grsswk = . if grsswk==-9
    replace grsswk = . if grsswk==-8

    gen nhqual = hiquald
    replace nhqual = . if hiquald==-9
    replace nhqual = . if hiquald==-8
    replace nhqual = . if hiquald==7
    replace nhqual = . if hiquald==6

    gen degreedummy = (nhqual==1)
    gen higheredudummy = (nhqual==2)
    gen gcedummy = (nhqual==3)
    gen gcsedummy = (nhqual==4)
    gen otherqualdummy = (nhqual==5)


    gen experience = age - edage1

    gen ln_age = ln(age)
    gen ln_grsswk = ln(grsswk)
    gen ln_experience = ln(experince)


    gen ethnic2 = ethnic
    replace ethnic2 = . if ethnic==9
    Attached Files

  • #2
    What is the problem here? I don't see anything surprising in your outputs.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      What is the problem here? I don't see anything surprising in your outputs.
      Hello, if you look at the last image the whitedummy is shown not to be significant when regressed with experience, I also ran regressions with different variables and without experience the p statistic was 0 but when added experience the p-statistic went up

      Comment


      • #4
        Yes, I saw that. There's nothing unusual about that. Whenever you add new variables to a model or take variables out, the estimates for the other variables can shift radically. It happens all the time. It is the analog in continuous variables of Simpson's paradox. (If you are not familiar with Simpson's paradox, there is a very good explanation in Wikipedia.)

        There's nothing wrong with these results; the problem is your expectations.

        Comment

        Working...
        X