Learn R Programming

mpr (version 1.0.6)

extractIC: Extracting Information Criteria for MPR models.

Description

This function extracts the Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC) from a fitted mpr model.

Usage

extractIC(object, aic = TRUE)

Arguments

object

fitted mpr model.

aic

logical. If TRUE, AIC is extracted. If FALSE, BIC is extracted.

Value

The AIC or BIC value.

See Also

mpr, addterm, dropterm.

Examples

Run this code
# NOT RUN {
# Veterans' administration lung cancer data
veteran <- survival::veteran
head(veteran)

mod1 <- mpr(Surv(time, status) ~ list(~ trt, ~ trt), data=veteran, family="Weibull")
mod1
extractIC(mod1) # AIC
extractIC(mod1, aic=FALSE) # BIC


# }

Run the code above in your browser using DataLab