Learn R Programming

tfarima (version 0.4.1)

AIC.tfm: AIC and BIC for Transfer Function Models

Description

Computes Akaike's Information Criterion (AIC) and Bayesian Information Criterion (BIC) for transfer function models.

Usage

# S3 method for tfm
AIC(object, ..., k = 2)

# S3 method for tfm BIC(object, ...)

Value

If one model: numeric value of AIC/BIC. If multiple models: data frame with columns df (degrees of freedom) and AIC for each model.

Arguments

object

A fitted tfm object.

...

Additional tfm objects for model comparison.

k

Numeric. Penalty per parameter. Default is 2 for AIC. Use k = log(n) for BIC where n is sample size.

Details

AIC = -2*logLik + k*npar, where npar is the number of parameters. Lower values indicate better fit penalized for complexity.

See Also

logLik.tfm, BIC.tfm

Examples

Run this code
if (FALSE) {
model1 <- tfm(output, inputs = tf1, noise = noise1)
model2 <- tfm(output, inputs = tf2, noise = noise2)

# Single model AIC
AIC(model1)

# Compare models
AIC(model1, model2)

# BIC
BIC(model1)
}

Run the code above in your browser using DataLab