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
Related Posts with Variables not working together
Problems with importing datasheatHey :D I have a problem with importing all the variables from a datasheat. I have mostly categorica…
Lasso bug - always included variable disappearsHi all, I'm running into a very bizarre issue while running the -lasso linear- command. I've been u…
Summary statistics for 2 dimensionsHi, I would like to do the following: I have a panel dataset with x groups and y years. For each yea…
loopHello everybody, I am a beginner in stata programming. However, I am looking for help in programming…
eventstudy 2 by Thomas Kaspereit - Implementation and conceptual questionDear all, I'm working on my Master's Thesis and came across eventstudy2, an excellent event study t…
Subscribe to:
Post Comments (Atom)
0 Response to Variables not working together
Post a Comment