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
stratified panelDear all, I have what I assume to be a stratified panel data (i.e. daily data on 3 cities, for each …
Plotting Survival Curve (Multi-level modeling and interaction terms)I am having difficulty plotting the different survival curves (specifically the hazard) following mu…
Common trend assumption in DiDHi all, I am currently working on a project where I try to investigate competition in online traffi…
Saving variables in foor loopDear all, I am new with stata and currently trying to figure out how to make the following loop wor…
Need-adjusted Health Care Utilisation and the Concentration IndexHello everyone, for my studies, I would like to estimate income-related inequality across countries…
Subscribe to:
Post Comments (Atom)
0 Response to Variables not working together
Post a Comment