| Event | R Documentation |
A lightweight response constructor used in cifcurve() and polyreg()
to pass survival and competing-risks data via a model formula.
Event(time, event, allowed = getOption("cifmodeling.allowed", c(0, 1, 2)))
time |
Numeric vector of follow-up times (non-negative). |
event |
Integer (0=censor, 1,2,...) or a character/factor vector whose levels are numeric codes "0","1","2",... for competing events. |
allowed |
Numeric vector of acceptable event codes. |
An object of class "Event" (a 2-column matrix) with columns time, event.
stable
polyreg() for log-odds product modeling of CIFs; cifcurve() for KM/AJ estimators; cifplot() for display of a CIF; cifpanel() for display of multiple CIFs; ggsurvfit::ggsurvfit, patchwork::patchwork and modelsummary::modelsummary for display helpers.
## event: 0=censor, 1=primary, 2=competing
data(diabetes.complications)
output <- polyreg(
nuisance.model = Event(t, epsilon) ~ +1,
exposure = "fruitq1",
data = diabetes.complications,
effect.measure1 = "RR",
effect.measure2 = "RR",
time.point = 8,
outcome.type = "competing-risk"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.