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
Demand estimation using Berry's modelDear all, I am working on demand estimation for automobiles. Applying Berry's model. My dependent v…
Residual variance from the market model for multiple companiesHi all, For my Master's thesis I have to calculate 'Market Model Adjusted Return' with market model…
Difference in difference on a cross sectional data set with small number of cluster groupHi, it is on an urgent basis I am running the following regression: with and without mean group ave…
Matrix operationsHi all, I am trying to perform a simple simulation on STATA. In particular I am constructing a vect…
Need help to test differences between datasetHello, I am doing my thesis but i could use some help with the statistical part. I combined two dat…
Subscribe to:
Post Comments (Atom)
0 Response to dummy=1 over a period when a condition satisfies
Post a Comment