mean_deviance_residuals: mean_deviance_residuals

View source: R/TSDT_scoring_functions.R

mean_deviance_residualsR Documentation

mean_deviance_residuals

Description

Computes the mean of the deviance residuals from a survival model

Usage

mean_deviance_residuals(data, scoring_function_parameters = NULL)

Arguments

data

data.frame containing response data

scoring_function_parameters

named list of scoring function control parameters

Details

Computes the mean of the deviance residuals from a survival model. The deviance residual at time t is computed as the observed number of events at time t minus the expected number of events at time t (see Therneau, et. al. linked below). The expected number of events is the number of events predicted by the survival model. If the event under study is an undesirable event (as would likely be the case in a clinical context), then a smaller value for the deviance residual is desirable – i.e. it is desirable to observe fewer events than expected from the survival model. In this case the appropriate value for desirable_response in TSDT is desirable_response = 'decreasing'. If the event under study is desirable then the appropriate value for desirable_response is desirable_response = 'increasing'. It is assumed that most survival models are modeling an undesirable event. Therefore, when the user specifies mean_deviance_residual or diff_mean_deviance_residual, the default value for desirable_repsonse is changed to 'decreasing', unless the user explicitly provides desirable_response = 'increasing'. Note this differs from all other TSDT configurations, for which the default value for desirable_response is desirable_response = 'increasing'.

Value

Mean of deviance residuals

References

Therneau, T.M., Grambsch, P.M., and Fleming, T.R. (1990). Martingale-based residuals for survival models. Biometrika, 77(1), 147-160. doi:10.1093/biomet/77.1.147. https://academic.oup.com/biomet/article/77/1/147/271076

See Also

TSDT, Surv, coxph, survfit


TSDT documentation built on April 7, 2022, 1:07 a.m.