--------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  Z:\laplace\laplace_ex1.smcl
  log type:  smcl
 opened on:  30 Oct 2017, 10:13:45


. /* > The most recent version of the -laplace- command dates from 9 June 2013 > To install it use the following command > net install laplacereg, from(http://www.imm.ki.se/biostatistics/stata) replace > */ . . use "http://www.imm.ki.se/biostatistics/data/kidney.dta", clear (Metastatic renal carcinoma trial. MRCRCC. Lancet. 1999, 353:14-7)

. stset months , fail(cens)

failure event: cens != 0 & cens < . obs. time interval: (0, months] exit on or before: failure

------------------------------------------------------------------------------ 347 total observations 0 exclusions ------------------------------------------------------------------------------ 347 observations remaining, representing 322 failures in single-record/single-failure data 4511.211 total analysis time at risk and under observation at risk from t = 0 earliest observed entry t = 0 last observed exit t = 74.56438

. sts graph , by(trt)

failure _d: cens analysis time _t: months

. // Median survival . stci , by(trt)

failure _d: cens analysis time _t: months

| no. of trt | subjects 50% Std. Err. [95% Conf. Interval] -------------+------------------------------------------------------------- MPA | 175 6.80548 .8902896 4.86575 8.15342 IFN | 172 9.830137 .8982793 7.7589 11.7041 -------------+------------------------------------------------------------- total | 347 7.956164 .5699226 6.90411 9.1726

. laplacereg months trt, q(50) fail(cens)

Laplace regression No. of subjects = 347 No. of failures = 322 ------------------------------------------------------------------------------ | Robust months | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- q50 | trt | 3.106033 1.219963 2.55 0.011 .714949 5.497118 _cons | 6.805478 .718854 9.47 0.000 5.39655 8.214406 ------------------------------------------------------------------------------

. // Median survival in new drug group (trt = 1) . lincom _cons + trt

( 1) [q50]trt + [q50]_cons = 0

------------------------------------------------------------------------------ months | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 9.911511 .9856773 10.06 0.000 7.979619 11.8434 ------------------------------------------------------------------------------

. // 25th, 50th, and 75th Percentile . laplacereg months trt, q(25 50 75) fail(cens)

Laplace regression No. of subjects = 347 No. of failures = 322 ------------------------------------------------------------------------------ | Robust months | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- q25 | trt | 1.476854 .714114 2.07 0.039 .0772168 2.876492 _cons | 2.498634 .373248 6.69 0.000 1.767082 3.230187 -------------+---------------------------------------------------------------- q50 | trt | 3.106033 1.219963 2.55 0.011 .714949 5.497118 _cons | 6.805478 .718854 9.47 0.000 5.39655 8.214406 -------------+---------------------------------------------------------------- q75 | trt | 3.811313 4.016758 0.95 0.343 -4.061387 11.68401 _cons | 15.87946 1.604595 9.90 0.000 12.73451 19.02441 ------------------------------------------------------------------------------

. log close name: <unnamed> log: Z:\laplace\laplace_ex1.smcl log type: smcl closed on: 30 Oct 2017, 10:13:47 --------------------------------------------------------------------------------------------------------------