Learn R Programming

asremlPlus (version 4.1-26)

infoCriteria.asreml: Computes AIC and BIC for a model.

Description

Computes Akiake and Bayesian (Schwarz) Information Criteria for a model.

Usage

# S3 method for asreml
infoCriteria(asreml.obj, DF = NULL, 
            bound.exclusions = c("F","B","S","C"), ...)

Arguments

asreml.obj

An asreml object resulting from the fitting of a model using REML.

DF

A numeric giving the number of estimated variance parameters. If NULL then this is determined from the information in asreml.obj.

bound.exclusions

A character specifying the bound (constraint) codes that will result in a variance parameter being excluded from the count of estimated variance parameters. If set to NULL then none will be excluded.

Provision for passsing arguments to functions called internally - not used at present.

Value

A data frame containing the degrees of freedom, number of bound parameters, AIC, BIC and log of the REML value.

Details

The degrees of freedom (DF) are the number of number of variance parameters that have been estimated, excluding those whose estimates have a code for bound specified in bound.exclusions. If DF is not NULL, the supplied value is used. Otherwise DF is determined from the information in asreml.obj.

If ASReml-R version 4 is being used then the codes specified in bound.exclusions are not restricted to a subset of the default codes, but a warning is issued if a code other than these is specified. For ASReml-R version 3, only a subset of the default codes are allowed: F (Fixed), B (Boundary), C (Constrained) and S (Singular).

The AIC is calculated as \(- 2 \times log(REML) + 2 \times DF\) and the BIC as \(- 2 \times log(REML) + DF \times (n - p)\), where \(n\) is the number of observations and \(r\) is the rank of the fixed effects design matrix.

See Also

REMLRT.asreml

Examples

Run this code
# NOT RUN {
   data(Wheat.dat)
   current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety, 
                         random = ~ Row + Column + units,
                         residual = ~ ar1(Row):ar1(Column), 
                         data=Wheat.dat)
    infoCriteria(current.asr)
# }

Run the code above in your browser using DataLab