AIC.bsplines {xhaz} | R Documentation |
Akaike's An Information Criterion for excess hazard model with baseline hazard following a B-splines functions
Description
Calculates the Akaike's ‘An Information Criterion’ for fitted
models from xhaz
.
Usage
## S3 method for class 'bsplines'
AIC(object, ..., k = 2)
Arguments
object |
a fitted model object obtained from |
... |
optionally more fitted model objects obtained from |
k |
numeric, the penalty per parameter to be used; the default |
Value
the value corresponds to the AIC calculated from the total log-likelihood of the fitted model if just one object is provided. If multiple objects are provided, a data.frame with columns corresponding to the objects and rows representing the number of parameters in the model (df) and the AIC
Examples
library("xhaz")
#Giorgi et al model: baseline excess hazard is a quadratic Bsplines
# function with two interior knots and allow here a
# linear and proportional effects for the covariates on
# baseline excess hazard.
levels(simuData$sex) <- c("male", "female")
fitphBS <- xhaz(formula = Surv(time_year, status) ~ agec + race,
data = simuData,
ratetable = survexp.us,
interval = c(0, NA, NA, 6),
rmap = list(age = 'age', sex = 'sex', year = 'date'),
baseline = "bsplines", pophaz = "classic")
fitphBS
AIC(fitphBS)
[Package xhaz version 2.0.1 Index]