calibration: Cross Validation

Description Usage Arguments Value Examples

View source: R/calibration.R

Description

Cross Validation

Usage

1
2
calibration(train, test = train, FittingFunction, covariates, time,
  by = 0.1, ...)

Arguments

train

a data.frame which includes follow up time, event, and covariates. In a k-fold cross validation this is a sample proportion (k-1)/k of the original data set.

test

a data.frame which includes follow up time, event, and covariates. In a k-fold cross validation this is a sample proportion 1/k of the original data set.

FittingFunction

a function which returns list of survival probabilities of individuals where each element in the list represent a specific time point.

covariates

character vector specifying the names of covariates

time

a numeric value specifying at what time survival probability is to be calculated.

by

a numeric value specifying the spacing between values in the proportion vector ranging from 0 to 1.

Value

The function returns a data frame of the proportion that had an event for a given survival probability including confidence intervals

Examples

1
calibration(train,test)

sor16/survivalValidation documentation built on May 30, 2019, 6:32 a.m.