Description Super class Methods
Survival data procesing
Survival data procesing
ukcovidtools::PassthroughFilesystemCache
-> SurvivalProcessingPipeline
new()
SurvivalProcessingPipeline$new(providerController, ...)
generateSurvivalData()
generate survival data and right censored data from
SurvivalProcessingPipeline$generateSurvivalData( df, idVar, startDateVar, endDateExpr, statusExpr = if_else(is.na({ { endDateExpr } }), 0, 1), censoredDateExpr = max({ { endDateExpr } }, na.rm = TRUE), ageVar = "age", ageBreaks = c(-Inf, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, Inf), ageLabels = c("0-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64", "65-69", "70-74", "75-79", "80+"), ageReferenceCat = NA_character_, statusLabels = c("censored", "died") )
path
- path to the ff100 file
data set in survival format including status, time, left, right, ageCat columns
generateNoAgeSurvivalData()
SurvivalProcessingPipeline$generateNoAgeSurvivalData( df, idVar, startDateVar, endDateExpr, statusExpr = if_else(is.na({ { endDateExpr } }), 0, 1), censoredDateExpr = max({ { endDateExpr } }, na.rm = TRUE), statusLabels = c("censored", "died") )
getMaxDate()
SurvivalProcessingPipeline$getMaxDate(df, dateCols)
transitionMatrix()
generate transition matrix with enquoted tidy column sepecifications
SurvivalProcessingPipeline$transitionMatrix(...)
...
a set of mappings
a transistion matrix
generateMultistateSurvivalData()
generate survival data and right censored data from a multistate model
SurvivalProcessingPipeline$generateMultistateSurvivalData( df, idVar, transMatrix, ageVar = "age", censoringDateExpr = getMaxDate(df, dateCols), startDateCol = names(allowableTransitions)[1], ageBreaks = c(-Inf, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, Inf), ageLabels = c("0-4", "5-9", "10-14", "15-19", "20-24", "25-29", "30-34", "35-39", "40-44", "45-49", "50-54", "55-59", "60-64", "65-69", "70-74", "75-79", "80+"), ageReferenceCat = NA_character_, ... )
path
- path to the ff100 file
data set in survival format including status, time, left, right, ageCat columns
createSurvivalSurfaces()
for a set of model parameters, calculate the distributions and median
SurvivalProcessingPipeline$createSurvivalSurfaces( modelParameterDf, days = 30, timepoints = seq(0.1, days, length.out = 100) )
modelParameterDf
- a data frame set of parameters for a range of models as param, value columns
days
- the time frame of the prediction
an dataframe of ageCat and time varying surfaces, including pdfs, cdfs and medians, with high and low estimates
plotSurvivalSurface()
plot a survival surface as a CDF
SurvivalProcessingPipeline$plotSurvivalSurface(surfacesDf, distr)
surfacesDf
- an dataframe of ageCat and time varying surfaces, including pdfs, cdfs and medians, with high and low estimates
distr
- a single distribution to plot
a plot of the survival surface (1-cdf)
plotIncidenceSurface()
plot a survival surface as a PDF
SurvivalProcessingPipeline$plotIncidenceSurface(surfacesDf, distr)
surfacesDf
- an dataframe of ageCat and time varying surfaces, including pdfs, cdfs and medians, with high and low estimates
distr
- a single distribution to plot
a plot of the survival surface as pdf
plotProbabilityMatrix()
SurvivalProcessingPipeline$plotProbabilityMatrix( surfacesDf, distr, pExpr = "p" )
clone()
The objects of this class are cloneable with this method.
SurvivalProcessingPipeline$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.