Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# st: stcrreg postestimation

 From savagec@mskcc.org To statalist@hsphsun2.harvard.edu Subject st: stcrreg postestimation Date Mon, 26 Jul 2010 16:49:46 -0400

```Hi all,

I'm using STATA's new competing risk regression command, stcrreg.  I'm trying to use the postestimation commands, but am running into problems.  My aim is to calculate the 10-year predicted cumulative incidence of cause-specific death (non-cause specific death is the competing risk) by age and adjusted to the mean of another covariate in the model.

To accomplish this, I ran the competing risks regression model:
. stset ttdeath, f(outcome==1)
. stcrreg age covariate1, compete(outcome==2)

Then I set covariate to the mean and asked STATA for the linear predictor (predict xb, xb). So far so good.

The problem came when I tried to calculate the baseline cumulative incidence or cumulative subhazard.  The issues I noticed were:

- Baseline cumulative incidence and subhazard predictions changed depending on whether I predicted them before or after setting the covariates to the mean.  My understanding of these functions was that they are calculated for subjects who have zero-valued covariates - so why would manually changing the covariate have any impact?  Moreover, if I manually set the covariate to zero, I actually get the same predictions as when I had set it to the mean (which was different than when I did nothing to the covariate).

Example:
. * predict baseline cumulative incidence BEFORE adjusting for covariate1
. predict basecif_before, basecif
.
. * set covariate1 to the mean
. qui sum covariate1
. qui replace covariate1 = r(mean)
.
. * predict baseline cumulative incidence AFTER adjusting for covariate1
. predict basecif_after, basecif
.
. * predict baseline cumulative incidence after setting covariate to zero
. replace covariate1 = 0

. predict basecif_zero, basecif

. sort _t

. list basecif_before basecif_after basecif_zero _t, ab(33)

+-----------------------------------------------------------+
| basecif_before   basecif_after   basecif_zero          _t |
|-----------------------------------------------------------|
1. |              0               0              0   .05475702 |
2. |              0               0              0   .06023272 |
3. |              0               0              0    .8295688 |
4. |              0               0              0    .9336071 |
5. |              0               0              0   1.1909651 |
|-----------------------------------------------------------|
6. |              0               0              0   1.3278576 |
7. |       .0075787        .0121167       .0121167   1.3607118 |
8. |       .0075787        .0121167       .0121167   1.5058179 |
9. |       .0075787        .0121167       .0121167   1.5441478 |
10. |       .0151121        .0241086       .0241086   1.7330595 |
|-----------------------------------------------------------|
11. |       .0151121        .0241086       .0241086   1.8918549 |
12. |       .0151121        .0241086       .0241086   2.0999315 |
13. |       .0225957        .0359711       .0359711   2.1629021 |
14. |       .0225957        .0359711       .0359711   2.1793292 |

- Manually replacing _t to a particular time (say 10 years for calculating the cumulative incidence at 10 years) also causes incorrect predictions of the baseline cumulative incidence or subhazard.  When I predict without replacing _t, the prediction at 10 years is different than the prediction after replacing _t to 10.

Continuing the list from above:
+--------------------------------------------+
| basecif_before   basecif_after          _t |
270. |       .4816974        .6463553   9.9219713 |
|--------------------------------------------|
271. |       .4816974        .6463553   9.9383984 |
272. |       .4816974        .6463553   9.9383984 |
273. |       .4816974        .6463553   9.9603014 |
274. |       .4870247        .6520672   9.9958935 |
275. |       .4870247        .6520672   10.004107 |
|--------------------------------------------|
276. |       .4923086        .6576962   10.031486 |
277. |       .4923086        .6576962   10.031486 |
278. |       .4975549         .663254   10.069816 |
279. |       .4975549         .663254   10.075291 |
280. |       .4975549         .663254   10.091718 |

. * and after replacing time (_t )to 10 years
. replace _t = 10
. predict basecif_10, basecif
. sum basecif_10

Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
basecif_10 |       685    .7447103           0   .7447103   .7447103

- And lastly, none of the above combinations gives me values that match those from stcurve (which I am currently treating as the gold standard).

Any insight would be greatly appreciated.

Thanks,
Caroline

=====================================================================

Please note that this e-mail and any files transmitted with it may be
privileged, confidential, and protected from disclosure under
applicable law. If the reader of this message is not the intended
recipient, or an employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
reading, dissemination, distribution, copying, or other use of this
communication or any of its attachments is strictly prohibited.  If
sender immediately by replying to this message and deleting this
message, any attachments, and all copies and backups from your
computer.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```