View source: R/DiscSurvEstimation.R
| estSurvCens | R Documentation |
Estimates the marginal survival function G(T=t) of the censoring process based on a life table estimator. Compatible with single event and competing risks data.
estSurvCens(dataShort, timeColumn, eventColumns, censInterval = "middle")
dataShort |
Data in original short format (class "data.frame"). |
timeColumn |
Name of column with discrete time intervals (class "character"). |
eventColumns |
Names of the event columns of |
censInterval |
Assumption about when censoring takes places within an interval on the continuous time scale (class "character"). Possible values are "start", "middle", "end". Default is "middle". |
Named vector of estimated survival function of the censoring process for all time points except the last theoretical interval.
In the censoring survival function the last time interval \left[ a_q, \infty \right)
has the probability of zero.
Thomas Welchowski t.welchowski@psychologie.uzh.ch
tutzModelDiscdiscSurv
estSurv
# Load unemployment data
library(Ecdat)
data(UnempDur)
# Select subsample
subUnempDur <- UnempDur [1:100, ]
######################
# Single event example
# Estimate censoring survival function G(t)
estG <- estSurvCens(dataShort = subUnempDur, timeColumn = "spell",
eventColumns = "censor1")
estG
#########################
# Competing risks example
# Estimate censoring survival function G(t)
estG <- estSurvCens(dataShort = subUnempDur, timeColumn = "spell",
eventColumns = c("censor1", "censor2", "censor3", "censor4"))
estG
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.