Announcement

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

  • stpm2_standsurv command; trouble with estimation of confidence intervals and standard errors

    I would welcome advice on using the stpm2_standsurv command. When I include the permitted option 'ci' to estimate a confidence interval I get the error message below.

    I tried to use the 'se' command instead to estimate the standard error and whilst I did not get an error message, no se was produced.

    I used the following commands

    . stpm2 age gender year_num CMno, scale(hazard) df(5) dftvc(4) eform

    . stpm2_standsurv, atvars(male female) at1(gender 0) at2(gender 1) timevar(tt) ci

    You can not use the ci option with the meansurv option
    r(198);


    Any suggestions much appreciated.

    Thank you





  • #2
    Hi Claire,

    I could not replicate this problem. Check you have the most up to date versions

    Code:
    . which stpm2
    c:\ado\stbplus\s\stpm2.ado
    *! version 1.7.2 02July2018
    
    . which stpm2_standsurv
    c:\ado\stbplus\s\stpm2_standsurv.ado
    *! version 1.1.2 12Jun2018
    Below is an example that works,

    Code:
    . webuse brcancer, clear
    (German breast cancer data)
    
    . stset rectime, f(censrec=1) scale(365.24)
    
         failure event:  censrec == 1
    obs. time interval:  (0, rectime]
     exit on or before:  failure
        t for analysis:  time/365.24
    
    ------------------------------------------------------------------------------
            686  total observations
              0  exclusions
    ------------------------------------------------------------------------------
            686  observations remaining, representing
            299  failures in single-record/single-failure data
      2,112.036  total analysis time at risk and under observation
                                                    at risk from t =         0
                                         earliest observed entry t =         0
                                              last observed exit t =  7.280145
    
    . stpm2 hormon x1 x3, scale(hazard) df(4) tvc(hormon) dftvc(3)
    
    Iteration 0:   log likelihood = -660.97597  
    Iteration 1:   log likelihood = -660.63796  
    Iteration 2:   log likelihood = -660.63627  
    Iteration 3:   log likelihood = -660.63627  
    
    Log likelihood = -660.63627                     Number of obs     =        686
    
    --------------------------------------------------------------------------------
                   |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ---------------+----------------------------------------------------------------
    xb             |
            hormon |  -.4378755    .165474    -2.65   0.008    -.7621986   -.1135524
                x1 |   .0010953   .0061046     0.18   0.858    -.0108696    .0130601
                x3 |    .015271   .0035736     4.27   0.000     .0082669    .0222751
             _rcs1 |    1.48559   .1511487     9.83   0.000     1.189344    1.781836
             _rcs2 |   .4595725    .146068     3.15   0.002     .1732845    .7458606
             _rcs3 |   .0093231   .0511747     0.18   0.855    -.0909774    .1096236
             _rcs4 |  -.0372922   .0184427    -2.02   0.043    -.0734392   -.0011452
      _rcs_hormon1 |   .1536967   .3026641     0.51   0.612     -.439514    .7469075
      _rcs_hormon2 |   .0966158   .2695097     0.36   0.720    -.4316135    .6248451
      _rcs_hormon3 |  -.0069616   .0766581    -0.09   0.928    -.1572088    .1432855
             _cons |  -1.671857   .3523227    -4.75   0.000    -2.362396   -.9813169
    --------------------------------------------------------------------------------
    
    . range tt 0 5 100
    (586 missing values generated)
    
    . stpm2_standsurv, atvars(notrt trt) at1(hormon 0) at2(hormon 1) timevar(tt) ci
    
    .

    Comment


    • #3
      Thank you Paul, you were correct! I had a 2012 version of stpm2 installed. Now works perfectly, thank you.

      Comment

      Working...
      X