It is tough to explain but i will try my best.
"Surge" is the dummy variable i created for capital flow surge episodes which lasts at least 2 quarters or more (so i removed single quarter episodes).
I want to count it as surge=1 only if during the period there is at least one episode of surge that goes above 2 std level ("surge_2sd=1").
So i would ideally count only those that are marked in yellow and replace the variable "surge" i.e. 2002q1-2002q4 to zero since there is no single episode during that period that goes above 2sd.
Could anyone help with the code?
Related Posts with dummy=1 over a period when a condition satisfies
Cox regression hazard ratio interpretation----------------------- Code: * Example generated by -dataex-. For more info, type help dataex clea…
over time per country graphI am working with panel data. Panel is consist of 170 countries and time period 1970 to 2020. I want…
Counting unique ID who taught a course in a given district and schoolHi, I imagine this question has already been answered but I cannot seem to find it. I want to figure…
Deleting household member when panelist and moving other household members into the gapHi, I’ve been working on a large panel study. We’ve reshaped a database for the entire population by…
Number of instruments more than number of groups in estimation resultI am a first-time user of STATA. I am trying to use system GMM to estimate a social welfare function…
Subscribe to:
Post Comments (Atom)
0 Response to dummy=1 over a period when a condition satisfies
Post a Comment