I'm have Version 15.1
I'm trying out some code from Flexible Parametric Survival Analysis Using Stata: Beyond the Cox Model.
It appears the code were written circa Version 11.
The code chokes at line 5 and I'm getting the error: command running is unrecognized
What would be the equivalent to line 5 for more recent versions of Stata?
use ew_breast_ch7, clear
stset survtime, failure(dead==1) exit(time 5) id(ident)
stcox dep5, nolog noshow
predict sca1, scaledsch
running sca1 _t if _d == 1, gen(smooth_sca) gense(smooth_sca_se) nodraw
gen smooth_esca = exp(smooth_sca)
gen smooth_esca_lci = exp(smooth_sca - 1.96*smooth_sca_se)
gen smooth_esca_uci = exp(smooth_sca + 1.96*smooth_sca_se)
local beta = exp(_b[dep5])
twoway (rarea smooth_esca_lci smooth_esca_uci _t, pstyle(ci) sort) ///
(line smooth_esca _t, sort lpattern(solid)) ///
(function y = 1, lpattern(shortdash) range(_t)) ///
(function y = `beta', lpattern(shortdash) range(_t)) ///
, legend(off) ///
ytitle("Exponentiated Scaled Schoenfeld Residual") ///
xtitle("Years from Diagnosis") ///
ylabel(,angle(h)) yscale(log) scheme(sj)
Related Posts with command running is unrecognized
Cleaning string variableDear all, I have a variable called place_birth in my dataset. Some of the locations weren't recorde…
Show the working directory and save it in a macroHi~ I can use command cd or pwd to show the working directory. But how can I save the returned resul…
Error merging master data with using data keeping the merge key as city and statefipI need to convert my master data to county level. For that in my master data I have statefip and cit…
Adding % to stacked bar chartDear statalisters, is there a way to add %-signs (by code) to my stacked bar chart? here is the co…
spacing between columns in collect tableThere are a couple of questions I have: 1. I want to keep median, IQR together while increasing the…
Subscribe to:
Post Comments (Atom)
0 Response to command running is unrecognized
Post a Comment