Dear all,
Y is a dummy variable (1 - crises occur, 0 - crises).
I have to crate a new variable X, that x =1, if within next 24 months a crises occur (in the next 24 month, Y has 1).
How can I code that X is searching in Y value from (A1:A24) in Stata?
Could you kindly help me.
Related Posts with How to create new variable X=1, if Y=1 in the 24 cells (A1:A24), and X=0, if in the 24 cells (A1:A24) =0
Create a subsample - Conditional, weighted random draw of observations, with repalcementDear Statalisters I want to create a random subsample of my original sample; I am basically drawing…
Value weighted returnsDear all, I am analysing stock returns for approximately 700 companies in Japan. My data is ordered…
GMM with Unit root dataHello, I have a question about the way I should treat unit root in unbalanced panel data analysis an…
Negative R squared in IV regressionGood afternoon everyone, I am running an instrumental variable regression for panel data with the c…
Generating an ID based on multiple variablesHello Statalisters! I am working with the Birth Recode survey of the Demographic and health surveys…
Subscribe to:
Post Comments (Atom)
0 Response to How to create new variable X=1, if Y=1 in the 24 cells (A1:A24), and X=0, if in the 24 cells (A1:A24) =0
Post a Comment