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
mi estimate not using all observationsHi all, I am trying out multiple imputation in STATA and I noticed something wondering if people can…
Lasso for binary outcomeI am using lassopack, do I need to specify anything if my outcome is binary? Thanks! …
Coefplot - option rename()Dear statalist members, in fact, I have got three questions concerning coefplot (Ben Jann, 2014) bu…
Calculating the lengthDear All, I was asked this question. First, the data is Code: * Example generated by -dataex-. To …
Embedded quotes questionHello, I'm trying to auto-generate do-files by copy/pasting from datasets created by the do-file th…
Subscribe to:
Post Comments (Atom)
0 Response to command running is unrecognized
Post a Comment