AIC.epifit: Function for calculating Akaike's 'An Information Criterion'...

Description Usage Arguments Value See Also Examples

View source: R/AIC.epifit.R

Description

Function called from generic function AIC in stats when the argument is epifit object.

Usage

1
2
## S3 method for class 'epifit'
AIC(object, ..., k = 2)

Arguments

object

a fitted epifit object.

...

not used in this version, only for compatibility purpose with generic function AIC currently.

k

numeric, the penalty per parameter to be used; the default k = 2 is the classical AIC.

Value

a numeric AIC value.

See Also

AIC.

Examples

1
2
3
4
5
6
7
8
9
library(survival)
# The simplest test data set from coxph function
test1 <- list(time=c(4,3,1,1,2,2,3),
              status=c(1,1,1,0,1,1,0),
              x=c(0,2,1,1,1,0,0),
              sex=c(0,0,0,0,1,1,1))
AIC(coxph(Surv(time,status)~x + strata(sex), data=test1))
modelexpr <- "cox(time,status)/strata(sex)~exp(beta*x)"
AIC(epifit(modelexpr=modelexpr, data=test1))

epifit documentation built on May 29, 2017, 3:43 p.m.