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
GAM download in statahow to download GAM (generalized additive model) in stata ? …
Destring a variableDear Stata Users, First, I want to create a year and month from "v1". I use the code below: Code:…
dummy variable in the two-way fixed effect modelI want to regress two-way fixed effect model with dummy variable using difference . the model look l…
Help with expanding a dataset and merging with a new dataset?Hi folks! I have a list of J respondents, each with an identifier and a zip code. I also have a sepa…
traffic accident analyze by logistic regression or binomial regression with didhi everyone, I want to use annual road traffic accident data for analysis. Since the people who caus…
Subscribe to:
Post Comments (Atom)
0 Response to Panel data survival model
Post a Comment