# kaplan-meier survival curve questions

I am not sure if this belongs is stack overflow or in cross-validated, so, I apologize if some feel it is in the wrong place. I am trying to do a survival analysis for 55 nests over a three year sampling period. Sample data, where;

1. Discovery is day of nesting period nest was discovered with 1 = to the day the first nest was discovered

2. Lastalive = last day nest was seen alive

3. Lastchecked = last day nest was checked

4. Nestfate = 0 succesful and 1 failed(predated, abandoned, or hen predated away from nests)

If nest was successful Lastalive and Last checked are the same day/number.

Discovery   lastalive   Lastchecked Nestfate
1  1   3   1
1  27  27  0
1   27  27  0
4   25  25  0
4   11  20  1
4   25  25  0
11  22  22  0
4   26  26  0
12  26  26  0
11  34  34  0
8   8   14  1
26  35  35  0
11  15  15  1
9   32  32  0
8   26  26  0
12  26  26  0
8   26  26  0
11  26  26  1
8   29  29  0
4   26  26  0
8   35  35  0
1   35  35  0
15  15  17  1
8   8   10  1
15  34  34  0
5   15  20  1
9   33  33  0
4   26  26  0
14  36  36  0
16  25  25  0
14  35  35  0
20  26  26  1
8   27  27  0
15  22  28  0
16  34  34  0
17  24  34  1
17  34  34  0
8   35  35  0
11  26  26  0
16  30  30  0
6   32  32  0
5   24  34  1
1   31  31  0
5   30  30  0
8   31  31  0
1   1   5   1
9   34  42  0
17  24  34  1
16  31  31  0
16  33  33  0
15  28  28  0
24  38  38  0
16  32  32  0
12  28  28  0
8   37  37  0

S <- Surv(time = nestdata$Discovery, time2 = nestdata$lastalive, event = nestdata$Nestfate) s = npsurv(Surv(nestdata$Survtime,
nestdata$Nestfate)~ 1, data=nestdata, conf.type="log-log") survplot(s, xlab="Time") summary(s)   time n.risk n.event survival std.err lower 95% CI upper 95% CI 1.0 55 3 0.945 0.0306 0.840 0.982 2.0 52 1 0.927 0.0350 0.818 0.972 3.0 51 1 0.909 0.0388 0.795 0.961 4.0 50 1 0.891 0.0420 0.773 0.949 6.0 49 1 0.873 0.0449 0.751 0.937 11.5 44 1 0.853 0.0481 0.727 0.924 12.0 43 2 0.813 0.0534 0.680 0.895 12.5 41 1 0.793 0.0557 0.658 0.880 15.0 35 1 0.771 0.0585 0.631 0.863 24.0 12 1 0.706 0.0816 0.513 0.834  So, I am wondering if I am am doing this corectly. Should my 'event' be a midpoint between lastalive and last checked? The nesting period, from time of discovery of 1st nest to the time of last nest hatched or predated is 42 days. How would I calculate mean survival time of nests with standard error over this period? and how would I summarize the summary output for my report into something meaningful. Now if I understand, I can then use this as baseline data for further analysis with covariates. With my factor covariates I would use the kaplan-meier, however, if I have numeric data I would use Coxph? And, if I wanted to have seperate survival curves for each study year or area on the same plot, would this be possible? if so, how would one go about this? MODEL <- survfit(Surv( time = nestdata$Neststart,
time2 = nestdata$lastalive, event = nestdata$Nestfate) ~ Age, data = nestdata)

model <- coxph(S ~ VOR2, data = nestdata)

• The last paragraph of your question suggests that you should read some more about survival analysis before delving into the calculation, as it basically boils down to: how to do survival analysis. However, as to: Should my 'event' be a midpoint between lastalive and last checked? You know the event happened some time in between two times you checked, so that would make it interval censored. – Frans Rodenburg Jan 26 '18 at 8:40
• There's also the complication that the analysis starting time for each nest seems to be when it was discovered, not when it was constructed or when (say) eggs were laid in it, which would probably be what you are most interested in. If so, you have left censoring too, not just right censoring and interval censoring, which is a pretty advanced topic in survival analysis. – EdM Jan 26 '18 at 12:06