I am using two waves of DHS survey and I need to run a weighted regression of education on age and a dummy variable z. I have set up the weights as follows:
Code:
egen N=total(v005) egen n=total(v005), by(s_year) * In this case I had 2 surveys gen wtr=v005*(N/2)/n egen psu=group(s_year v021) egen stratar=group(s_year v022) svyset psu [pw=wtr], strata(stratar) singleunit(centered)
Code:
svy: regress educ z yob z_yob
Beta_z = -264.59 both the sign and magnitude is implausible here where the correct coefficient should be around 1.34.
Beta_yob = 0.05 which is correct (replication)
Beta z_yob = 0.133 which is also correct (replication)
constant = incorrect but close to correct value.
0 Response to Svy Command and incorrect coefficient
Post a Comment