[R] How to get CI from surfit object in survival
Bert Gunter
bgunter.4567 at gmail.com
Sun Aug 27 02:38:07 CEST 2017
Did you not notice the conf.type = "none" argument to your survfit
call and the associated documentation in the survfit help?
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Aug 26, 2017 at 5:18 PM, Adrian Johnson
<oriolebaltimore at gmail.com> wrote:
> Dear Bert,
> thank you for suggestion. I am aware of R-help function. I must
> apologize, my earlier question could lead to assumptions otherwise.
>
> As you can see below, I only get Std. error but not lower and Upper CIs.
>
> I was wondering if there is another argument or method, could give CIs
> which I cannot find anywhere.
>
> Thanks
> Adrian
>
>
>> Nsurv <- survfit(Surv(NOSM,NStat)~as.factor(expcat1),conf.type='none',type='kaplan-meier')
>
>
>> summary(Nsurv,time=c(12,24))
> Call: survfit(formula = Surv(NOSM, NStat) ~ as.factor(expcat1),
> conf.type = "none", type = "kaplan-meier")
>
> 1 observation deleted due to missingness
> as.factor(expcat1)=DN
> time n.risk n.event survival std.err
> 12 36 15 0.711 0.0629
> 24 21 8 0.535 0.0722
>
> as.factor(expcat1)=UP
> time n.risk n.event survival std.err
> 12 20 9 0.704 0.0833
> 24 9 9 0.359 0.0931
>
>> sessionInfo()
> R version 3.2.3 (2015-12-10)
> Platform: i386-w64-mingw32/i386 (32-bit)
> Running under: Windows 8.1 x64 (build 9600)
>
> locale:
> [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
> States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] survival_2.39-5
>
> loaded via a namespace (and not attached):
> [1] Matrix_1.2-6 splines_3.2.3 grid_3.2.3 lattice_0.20-33
>
> On Sat, Aug 26, 2017 at 7:24 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>> ???
>>
>> Both ?survit.object (linked in the see also section of ?survfit) and
>> ?summary.survfit give you this information. Do you not know how to use
>> R's help faciities -- in which case you should learn them now; see
>> ?help -- or have I misunderstood your query?
>>
>> Cheers,
>> Bert
>>
>>
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>>
>> On Sat, Aug 26, 2017 at 4:03 PM, Adrian Johnson
>> <oriolebaltimore at gmail.com> wrote:
>>> Hi
>>> I am not sure hiw to get thr CI from summary function on the survfit object.
>>> I can get the percent survival for 2 years from survfit object but I dont
>>> get Confidence intervals
>>> Could anyone suggest a hint
>>> Thanks
>>> Adrian
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list