Skip to contents

Flexible Relative Survival Analysis

Usage

flexiblerelativesurvival(
  data,
  timeVar,
  statusVar,
  ageVar,
  sexVar,
  yearVar,
  covariates,
  expectedType = "lifetable",
  smoothingMethod = "splines",
  knotsTime = 5,
  knotsAge = 3,
  smoothingParameter = 1,
  confidenceLevel = 95,
  plotRelativeSurvival = TRUE,
  plotExcessHazard = TRUE,
  plotLifeExpectancy = FALSE,
  predictTimePoints = "1,2,3,5,10",
  standardizeAge = TRUE
)

Arguments

data

.

timeVar

.

statusVar

.

ageVar

.

sexVar

.

yearVar

.

covariates

.

expectedType

.

smoothingMethod

.

knotsTime

.

knotsAge

.

smoothingParameter

.

confidenceLevel

.

plotRelativeSurvival

.

plotExcessHazard

.

plotLifeExpectancy

.

predictTimePoints

.

standardizeAge

.

Value

A results object containing:

results$instructionsa html
results$modelSummarya table
results$coefficientsa table
results$relativeSurvivala table
results$smoothingInfoa table
results$goodnessOfFita table
results$relativeSurvivalPlotan image
results$excessHazardPlotan image
results$lifeExpectancyPlotan image

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$modelSummary$asDF

as.data.frame(results$modelSummary)