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
esttab summary stats tableHello, I am using estout package to create my summary stats table. I only want the stats for one v…
Creating bar chart with multiple binary variablesHi, I am attempting to create a bar chart in Stata that shows proportions for multiple different bin…
gen var1=var2, generates some wrong values Code: gen geo3= geo3_bd2001 gives the following values. I wonder what might cause this. Any idea pl…
Analysing which colour contributes to the greatest price premiumHi Everyone, I hope you're well! I am trying to observe what colours have the greatest price premi…
miliseconds datetime convertionHi , my dataset has a datetime string like this: Code: clear input str28 activityDateTime "2022-1…
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