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
Data FilteringI am working with WRDS data. A short sample (not real) is pasted below (sorry for the formatting of …
Help in Propensity Score MatchingI am at the learning stage of Propensity score matching. My dependent variables are ROA and Tobin q.…
Renaming Variables from string in other variabelHi there, I have a peculiar problem. We are working with panachage voting from Swiss elections. Our…
Pseudo-R^2 after matching with atts.adoDear all, I am currently trying to apply different propensity score matching estimators to my data.…
Mapping across 2 datasets Dear All, I am stuck trying to loop through every observation from one dataset and map the results…
Subscribe to:
Post Comments (Atom)
0 Response to Variables not working together
Post a Comment