Hi,
I am trying to generate a household-specific monetary policy shock variable. Generally I have two data sets.
One containing panel data on household level from 2004-2018. The other contains changes in euro swaps around ECB meetings which is my indicator of monetary policy shocks.
Now I need to merge the two data sets. However, the households were interviewed at different points in time during the same year which means that HH1 that was interviewed in week 12 of 2004 and then again in week 20 of 2015 has experienced more monetary policy meetings than HH2 that was interviewed in week 12 of 2004 and then again in week 12 of 2005. Therefore, I have to sum up the changes in the Euro Swap for every HH individually from week x year t-1 to week x year t.
Do you know any command that would allow me to sum up the HH-specific amount of meetings more efficiently than doing it manually for 6,000 observations for 14 years.
Thank you,
Fabienne Leibfarth
Related Posts with Summing up individual-specific amount of variables
How to do Summations?Hello, I'm very new to stata and am having trouble figuring this out. If have have 2 variable lists,…
How to get coefficients for other covariates in a propensity score weighting model?How to show coefficients for other covariates in a propensity score weighting model (IPW)? The PHP…
How to create a loop to select 2 variables from a list?Hello! I would like to create a loop that allows me to select all the possible combinations of 2 va…
Copying Variable Names That Are Missing within a RangeHi, all. I have dataset where country names (variable: Country) are missing rather randomly. I have…
Graph of mean/ci over time by categorical variableHi, I am relatively new to stata but have looked for help ciplot and help xtgraph plus hours online …
Subscribe to:
Post Comments (Atom)
0 Response to Summing up individual-specific amount of variables
Post a Comment