Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SV: st: SV: SV: stcompet and cumulative incidence at a specific point in time
From
Rikke Esberg Kirkfeldt <[email protected]>
To
"[email protected]" <[email protected]>
Subject
SV: st: SV: SV: stcompet and cumulative incidence at a specific point in time
Date
Mon, 17 Jun 2013 08:46:01 +0000
Dear Nick,
But of course :-) Thank you!
Best regards,
Rikke
Rikke Kirkfeldt, MD, PhD
Department of Cardiology
Aarhus University Hospital
Denmark
________________________________________
Fra: [email protected] [[email protected]] på vegne af Nick Cox [[email protected]]
Sendt: 17. juni 2013 10:38
Til: [email protected]
Emne: Re: st: SV: SV: stcompet and cumulative incidence at a specific point in time
Stata version is not the problem here. Make sure that
noi table `2' if _t<`1' & _cif_<., c(max _t max _cif_ max _ciflo max
_cifhi) format(%04.3f)
appears as one logical command line in your program.
Nick
[email protected]
On 17 June 2013 09:31, Rikke Esberg Kirkfeldt <[email protected]> wrote:
> Dear Adam,
>
> Thank you for the program.
> Unfortunately, I only have Stata v.11.2, so I had to change the command a bit, and it now reads:
>
> program define ciflist
> version 11.2
> syntax anything [if]
> capture drop _cif*
> stcompet _cif_ = ci _cifhi = hi _ciflo = lo `if', compet1(2)
> noi table `2' if _t<`1' & _cif_<., c(max _t max _cif_ max _ciflo max
> _cifhi) format(%04.3f)
> end
>
>
> When I run the -ciflist 5 outcom- the following happens:
>
> ciflist 5 outcome
> ) required
> r(100);
>
> I've tried to include a -)- that doesn't help. Maybe the Stata version is the problem?
Adam Olszewski
> You can also use this short program to list the basic CIF and 95% CI:
>
> program define ciflist
> version 12.1
> syntax anything [if]
> capture drop _cif*
> stcompet _cif_ = ci _cifhi = hi _ciflo = lo `if', compet1(2)
> noi table `2' if _t<`1' & _cif_<., c(max _t max _cif_ max _ciflo max
> _cifhi) format(%04.3f)
> end
>
>
> Then you can type e.g.
> -ciflist 5 cevent-
> where "cevent" is your fail-event variable and 5 is the time you want
> the point estimate for. This assumes that value 1 is your event of
> interest and value 2 is a competing event.
> The downside is that you have to wait for a new stcompet run each
> time, but of course you could modify it to run just once.
On Mon, Jun 17, 2013 at 3:06 AM, Rikke Esberg Kirkfeldt <[email protected]> wrote:
>> Dear Katja and Enzo,
>>
>> Thank you so much for your replies.
>>
>> Katja, indeed the pseudo value approach would be appropriate. However, we plan to use the cumulative incidence curves, and all I wanted was a relatively precise way of estimating the cumulative incidence from the curves generated after stcompet. And I believe, Enzo, that your solution does just that.
>>
>> Would it be correct to replace –ci- with –lo- and –hi- in order to estimate the confidence intervals, like this?
>>
>> . stset survtime, failure(outcome==1)
>>
>> failure event: outcome == 1
>> obs. time interval: (0, survtime]
>> exit on or before: failure
>>
>> ------------------------------------------------------------------------------
>> 1415 total obs.
>> 0 exclusions
>> ------------------------------------------------------------------------------
>> 1415 obs. remaining, representing
>> 247 failures in single record/single failure data
>> 6708.504 total analysis time at risk, at risk from t = 0
>> earliest observed entry t = 0
>> last observed exit t = 10.58179
>>
>> . stcompet ci=ci hi=hi lo=lo, compet1(2)
>>
>> . forval i = 1(1)5 {
>> 2. qui su _t if _t<=`i'
>> 3. local tobs = `r(max)'
>> 4. qui su ci if _t<=`i'
>> 5. local ciat = `r(max)'
>> 6. if `i'==10 di _col(5) "at" _col(18) "Obs Time" _col(33) "Cum Inc"
>> 7. di _col(5) `i' _col(20) `tobs' _col(35) `ciat'
>> 8. }
>> 1 .99657768 .04452297
>> 2 1.9986311 .0864664
>> 3 2.9952087 .11046968
>> 4 3.9972622 .14158537
>> 5 4.9993157 .17513161
>>
>> .
>> . forval i = 1(1)5 {
>> 2. qui su _t if _t<=`i'
>> 3. local tobs = `r(max)'
>> 4. qui su lo if _t<=`i'
>> 5. local ciat = `r(max)'
>> 6. if `i'==10 di _col(5) "at" _col(18) "Obs Time" _col(33) "Cum Inc"
>> 7. di _col(5) `i' _col(20) `tobs' _col(35) `ciat'
>> 8. }
>> 1 .99657768 .03464053
>> 2 1.9986311 .07253825
>> 3 2.9952087 .09467253
>> 4 3.9972622 .12335587
>> 5 4.9993157 .15447509
>>
>> . forval i = 1(1)5 {
>> 2. qui su _t if _t<=`i'
>> 3. local tobs = `r(max)'
>> 4. qui su hi if _t<=`i'
>> 5. local ciat = `r(max)'
>> 6. if `i'==10 di _col(5) "at" _col(18) "Obs Time" _col(33) "Cum Inc"
>> 7. di _col(5) `i' _col(20) `tobs' _col(35) `ciat'
>> 8. }
>> 1 .99657768 .05616275
>> 2 1.9986311 .10186408
>> 3 2.9952087 .12760713
>> 4 3.9972622 .16104027
>> 5 4.9993157 .1968829
>>
>> Best regards,
>>
>> Rikke Kirkfeldt, MD, PhD
>> Department of Cardiology
>> Aarhus University Hospital
>> Denmark
>>
>> ________________________________________
>> Fra: [email protected] [[email protected]] på vegne af Katja Maretty Nielsen [[email protected]]
>> Sendt: 16. juni 2013 08:42
>> Til: [email protected]
>> Emne: st: SV: stcompet and cumulative incidence at a specific point in time
>>
>> Dear Enzo.
>>
>> I've encountered the same problem, but was advised to use the psudovalue approach with the -stpci-, were you generate pseudo values at the time you are interested in:
>>
>> gen cevent=(dssstatus==2)
>> label variable cevent "competing risk event"
>> stpci cevent, at(1 2 3 4 5)
>> glm pseudo1, fam(gauss) link(id) vce(robust)
>> glm pseudo2, fam(gauss) link(id) vce(robust)
>> glm pseudo3, fam(gauss) link(id) vce(robust)
>> glm pseudo4, fam(gauss) link(id) vce(robust)
>> glm pseudo5, fam(gauss) link(id) vce(robust)
>>
>> Hope this helps.
>>
>> Best regards
>>
>> Katja Maretty Nielsen
>>
>> MD, Phd-student
>> Dept. of Experimental Clinical Oncology
>> Aarhus University Hospital
>> Noerrebrogade 44, building 5
>> DK- 8000 Aarhus C
>> Tel.: +45 78462621 / 50904640
>> Mail: [email protected]
>> ________________________________________
>> Fra: [email protected] [[email protected]] på vegne af Enzo Coviello [[email protected]]
>> Sendt: 16. juni 2013 08:14
>> Til: [email protected]
>> Emne: st: stcompet and cumulative incidence at a specific point in time
>>
>> Hi All,
>>
>> Is there a Stata command that can be used to list (at specific time
>> points e.g. -sts list, at (0 (1) 5)-)
>> the cumulative incidence function with confidence intervals from a
>> competing risk analysis (after the –stcompet- command)?
>>
>>
>> As far as I know there is not a command.
>> The following code should approximately obtain what you need supposing
>> that the -ci- is the name of the variable containing the cumulative
>> incidence:
>>
>> forval i = 1(1)5 {
>> qui su _t if _t<=`i'
>> local tobs = `r(max)'
>> qui su ci if _t<=`i'
>> local ciat = `r(max)'
>> if `i'==10 di _col(5) "at" _col(18) "Obs Time" _col(33) "Cum Inc"
>> di _col(5) `i' _col(20) `tobs' _col(35) `ciat'
>> }
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/