timetoeventprediction: Example fitted time to event prediction

timetoeventpredictionR Documentation

Example fitted time to event prediction

Description

Example fitted time to event prediction

Usage

data(timetoeventprediction)

Format

An object of class list of length 6.

Examples


## Code that generates this object - following example in vignette
set.seed(10)
T.morts.sim <- simulate_cycloSurv(300, period = 365, meanhazard = 1/365, 
peaks = c(100, 250), durations = c(25, 40), weights = c(0.4, 0.6), plotme = FALSE)
T.morts.fit <- fit_cyclomort(T.morts.sim, n.seasons = 2)
timetoeventprediction <- predict(T.morts.fit, t = 1:365, 
                                 type = "timetoevent", CI = TRUE, nreps = 100)

data(timetoeventprediction)
with(timetoeventprediction, {
plot(t, fit, type = "l", ylab = "Time to event", ylim = range(CI), lwd = 2)
lines(t, CI[1,])
lines(t, CI[2,])})

cyclomort documentation built on June 8, 2025, 11:04 a.m.