Re: Merging data files differend years same IR [message #11927 is a reply to message #11917] |
Tue, 07 March 2017 14:26 |
bakerchowdhury
Messages: 25 Registered: April 2014
|
Member |
|
|
Thank you so much for the response. Yes, my survey indicator variable is 'year' which takes values 1999, 2004,...2014.
Here are the steps I have done in my code
* create sample weight variable
gen wgt=v005/1000000
* generate new psuid and stratumid variable for svy command
egen psuid=group(year v021)
egen stratumid=group(year v022)
* set svy command
svyset[pw=wgt],psu(psuid) strata(stratumid)
*Example regression
svy: reg y x v012 i.v190
Could you please have a look if this looks okay.
Best regards,
Baker
|
|
|