Hello everyone!
I have a country code year panel data. I want to create a duration variable (dur_regime) that starts when war starts (the first year war=1) and ends when the regime falls (gwf_fail=1). For the same country, multiple wars and multiple regime falls possible, however, if there are more than one war or regime fall war and gwf_fail are still coded as 1 (binary). Could you please let me know how do I create this variable?
Also, once I have created this variable, I would like to run a stcox regression in which failure (dur_regime==1) and main independent variable is alliance. Could someone please let me know how do I set the stset properly for this purpose?
Thanks a million!
Related Posts with Panel data survival model
Recoding into an existing variableHello, I am trying to add text responses to an existing variable. I have a variable Q33_20_TEXT th…
Collapse (count) ifDear Stata Users My data is in a panel format at the daily frequency (id, date). I run time-series …
GMM coefficientsHi statalisters, I have some doubt about the dynamic short panel data estimation. When one makes an…
Confusion about FE and DIDHello everyone, this is my first post here so please excuse me if the formatting is not great yet. I…
plotting interaction after XTSCC commandHow do I plot interactions after the XTSCC command? …
Subscribe to:
Post Comments (Atom)
0 Response to Panel data survival model
Post a Comment