Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • command running is unrecognized

    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)

  • #2
    at least on my machine, -running- is user-written and needs to be installed; use -search- or -findit- to locate and install

    Comment


    • #3
      Rich Goldstein is right. As a keyword running is not ideal, but the early history is exposed by


      Code:
       search sed9, entry historical
      
      Search of official help files, FAQs, Examples, and Stata Journals
      
      SJ-5-2  sed9_2  . . . . . . . . . . . . . . . . .  Software update for running
              (help running if installed) . .  P. Sasieni, P. Royston, and N. J. Cox
              Q2/05   SJ 5(2):285
              running rewritten to support Stata 8 graphics and otherwise
              modernized;  now attributable to the three authors named above
      
      STB-41  sed9.1  . . . . . . . . . . Pointwise confidence intervals for running
              (help running if installed) . . . . . . . .  P. Sasieni and P. Royston
              1/98    pp.17--23; STB Reprints Vol 7, pp.156--163
              improved version that allows analytic weights, standard errors
              and confidence bands to be calculated and added to the graph,
              twicing, maximum span of 2 for a running line smoother
      
      STB-24  sed9  . . . . . . . . . .  Symmetric nearest neighbor linear smoothers
              (help running if installed) . . . . . . . . . . . . . . . . P. Sasieni
              3/95    pp.10--14; STB Reprints Vol 4, pp.97--101
              alternative to ksm; for use when the number of observations is
              large (because faster than ksm); does not permit arbitrary weights
      Of the various authors Peter Sasieni and Patrick Royston are not active here. The version on SSC is the one I would go for. as more up-to-date.

      I tend to use lpoly myself for anything similar.

      Comment

      Working...
      X