bvowe
bvowe

Reputation: 3384

Getting cumulative risk values

Consider the following toy example:

use https://data.princeton.edu/pop509/justices2.dta, clear
stset tenure, fail(event == 1)
stcrreg age year, compete (event == 2)
stcurve, cif

I want to plot a cumulative incidence curve as done above but then I want to store those values with their 95% confidence intervals. However, it is not clear to me how to access/store them as variables.

Cross-posted at Statalist.

Upvotes: 0

Views: 233

Answers (1)

user8682794
user8682794

Reputation:

Use the outfile() option of the stcurve command:

stcurve, cif outfile(stdata)

use stdata

list in 1/10

     +---------------------+
     |      ci1         _t |
     |---------------------|
  1. | .0465373   5.691992 |
  2. |        0   1.045859 |
  3. | .2600816    20.6078 |
  4. | .1169629   8.876112 |
  5. | .0465373   5.724846 |
     |---------------------|
  6. | .1249585   9.440109 |
  7. |        0   .4462697 |
  8. | .1574731   13.49213 |
  9. | .1991083   15.36756 |
 10. | .0232038   4.769336 |
     +---------------------+

Upvotes: 2

Related Questions