..hello again..i'm stuck in stata code below..can you transcribe it into R language..?
* COUPS
gen c_coup=c
replace c_coup=0 if exit!="coup"
stset time, id(leadid) failure(c_coup)

* REVOLT ENTRY LEFT OUT BECAUSE IT IS A PERFECT PREDICTOR
streg  legislature  leg_growth_2 gdp_1k chgdpen_fearonlaitin Oil_fearonlaitin postcoldwarlag civiliandictatorshiplag militarydictatorshiplag communist lpopl1_fearonlaitin ethfrac_fearonlaitin relfrac_fearonlaitin  age, distribution(weibull) time
outreg2 using survival, replace ctitle(coups, partial) tex nonotes bdec(3) e(all)
stcurve, hazard The response should be in all capital letters.
user