# Thread: Cumulative Incidence with Confidence Intervals when using IPTW

1. ## Cumulative Incidence with Confidence Intervals when using IPTW

Dear Stata users,

I'm doing a time to event analysis with inverse probability of treatment weights(IPTW) estimated with propensity scores from a multivariate logistic regression model.

I have estimated a weight adjusted hazard ratio and would like estimate a cumulative incidence at specific time points (day 90 and year 5) with 95% confidence intervals.

I'm also doing a competing risk analysis with the same method.

Below is the code I would use:

stset timevar [pweights=iptw], failure(cause==1) exit(time 1826.25)
sts list, at(90 1826.26)

This gives me estimates of cumulative incidence; however, not a 95% CI. To my knowledge the confidence intervals was removed in Stata 10 (see following link: http://www.stata.com/statalist/archi.../msg00124.html ).
Do any of you have experience with obtaining the confidence intervals for cumulative incidence in Stata when the data are weighted?

In the competing risk analysis I use the following code:

stset timevar [pweights=iptw], failure(cause==1) exit(time 1826.25)
stcompet ci = ci se = se, compet1(2)

When I use the stcompet command it changes cumulative incidence estimates compared to when I not include weights in the stset command, but are the SE obtained by this method valid when weights are used? In the help file for stcompet weights are not mentioned.
I'm using Stata 14.2 for Mac.

2. ## Re: Cumulative Incidence with Confidence Intervals when using IPTW

Firstly, I reported the above spam, so it will be removed.

Secondly, I am not a STATA user, but what I would do is get bootstrap percentile confidence intervals if you can't figure it out. So get about 1,000 bootstrap samples of your original data and run the model 1,000 times and order the 1,000 estimates from smallest to largest and grab the 25th and 975th estimate and use those as your CI.

I didn't go to your link, but you may also want to ask yourself why they got rid of the option?

Second, a question back to you: I only run survival analysis say about once every couple of years and haven't used competing risk. do you have any references for the approach or any generic guidance on how easy it is or how the process works. Thanks.

3. ## Re: Cumulative Incidence with Confidence Intervals when using IPTW

Side note, I was just thinking that the weights are based on the original dataset from its logistic model and now you are applying those weights to new datasets (bootstrap sets). Hmm, this doesn't worry me tremendously, but could create a slight bias perhaps. An extreme option may be to create weights for each set, if easily done, but I don't know if that is completely necessary. How big is your sample size? Also, how big is your non-ignorability threat (confounding)? So how much more balance are you gaining by using the weights?

 Tweet