Dear all,
I have a household survey dataset consisting of two rounds. The dataset provides information on the month and the year of the interview. In round 1, a household could have been interviewed either in 2004 or in 2005 in any month. In round two, a household could have been interviewed either in 2011 or in 2012 in any month.
Additionally, I have monthly weather data for every year (e.g. T2004_1 for average temperature in January 2004).
I would like to generate a variable that captures the following information for every household for every round: average spring (January-March), summer (June-September) and winter (October-November) temperature and precipitation preceding the interview.
So for instance, for a household that was interviewed in round 1 in December 2004 the variables would be generated for the year 2004.
However, a household that was interviewed in June 2004 would draw on both, information from 2003 on winter and summer weather and 2004 for spring weather. I am however not really sure how to generate this variable. Could anyone please help?
Many thanks.
Related Posts with Generate variable capturing properties of other variables
Sample Selection BiasI have some data from the labour force survey and I'm estimating wage regression. I want to include …
Trying to do Rolling Standard Deviation give me this error. Can someone help ?Here is the command: tsset GVKEY_n Year rolling sd_NIBE=r(sd), window (4) clear : su NetIncome And…
How to make household the unit of analysis when using a household survey dataHello everyone, I am currently working on LSMS-ISA for Nigeria, however, whilst some sections have …
can we transfer args in different do file or how to use statapush efficiently?As far as I know, user-command statapush can be used in seperate way. Usually, I have to seperate do…
3SLS with Instrument VariablesIs it possible to run a 3SLS specification using instrument variables in Stata? I have the followin…
Subscribe to:
Post Comments (Atom)
0 Response to Generate variable capturing properties of other variables
Post a Comment