ICdetails: Extract details of information criterion

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/ICdetails.R

Description

The function extract details of information criterion (IC, e.g. AIC, AICc) allowing calculate difference in IC from minimum - IC model (delta), the Akaike weights and the sum of Akaike weights by each explanatory variable (relative importance of each variable).

Usage

1
ICdetails(x, variables = NULL, order = TRUE)

Arguments

x

A data frame or matrix containing the information criterion for each model. The information criterion in the first column and the models in rows. See examples.

variables

A data frame or matrix containing the indication of all independent variables used in each model. The models in row and variables in columns. This must be binary, where 1 indicate presence of variable in respective model and 0 the ausence of the variable in respective model. See examples (default variables = NULL).

order

Logical argument (TRUE or FALSE) to specify if informtion criterion is sorted (Default order = TRUE).

Value

A list with:

call

The arguments used.

IC

A data frame containing the information criterion, difference in IC from minimum - IC model (delta) and the weights IC.

IValue

Relative importance of each variable.

Author(s)

Vanderlei Julio Debastiani <vanderleidebastiani@yahoo.com.br>

References

Anderson, D.R. 2008. Model Based Inference in the Life Sciences: A Primer on Evidence. Springer-Verlag New York.

See Also

ICtab

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
my.aic <- matrix(c(4,2,3,5),4,1)
colnames(my.aic) <- "AIC"
rownames(my.aic) <- rownames(my.aic, do.NULL = FALSE, prefix = "M.")
my.aic
ICdetails(my.aic)

my.models.by.variables<-matrix(c(1,0,0,0,0,1,1,0,0,1,0,1,0,0,0,1),4,4)
colnames(my.models.by.variables) <- colnames(my.models.by.variables, 
    do.NULL = FALSE, prefix = "Var.")
rownames(my.models.by.variables) <- rownames(my.aic)
my.models.by.variables
ICdetails(my.aic, variables = my.models.by.variables)

vanderleidebastiani/daee documentation built on Jan. 22, 2021, 2:41 p.m.