crrfit: 'crr' model fit statistics

crrfitR Documentation

crr model fit statistics

Description

Functions to assess the quality of fitted crr and crr2 objects.

Select multiple types of Akaike or Bayesian (Schwarz) information criterion from a crr object to assess the relative quality of models for a given data set.

Usage

extractIC(object, ic = c("AIC", "BIC", "AICc", "BICc"), p)

## S3 method for class 'crr'
extractAIC(fit, scale, k = 2, ...)

## S3 method for class 'crr'
AIC(object, ...)

## S3 method for class 'crr'
BIC(object, ...)

## S3 method for class 'crr'
logLik(object, ...)

## S3 method for class 'crr'
deviance(object, ...)

Arguments

object

an object of class crr

ic

information criterion, one of "AIC", "BIC", "AICc", or "BICc"; see details

p

an optional penalty term to be multiplied by, k, the number of free parameters estimated in each model including the intercept term

fit, scale, k

see extractAIC

...

additional arguments passed to or from other methods

Details

AIC and BIC are calculated in the usual way. AICc is the AIC with a correction for finite sample sizes. This assumes that the model is univariate, linear, and has normally-distributed residuals (conditional upon regressors).

BICc is a newly proposed criteria that is a modified BIC for competing risks data subject to right censoring (Kuk, 2013).

References

Kuk D, Varadhan R. Model selection in competing risks regression. Stat Med. 2013 Aug 15;32.

See Also

crrFits; crrwald.test

Examples

crrs <- crr2(Surv(futime, event(censored) == death) ~ age, transplant)
crr1 <- crrs[[1L]]

crr1$coef
coef(crr1)
coefficients(crr1)

extractAIC(crr1)
sapply(crrs, AIC)

## these are equivalent
extractIC(crrs[[1L]], p = 0)
-2 * logLik(crrs[[1]])[1]
-2 * crrs[[1]]$loglik

deviance(crr1)

crrFits(crr1)
crrwald.test(crr1)


raredd/cmprsk2 documentation built on March 29, 2024, 5:34 a.m.