Learn R Programming

MARX (version 0.2)

bic: The Bayesian/Schwarz information criterion (BIC) function

Description

This function allows you to calculate the Bayesian/Schwarz information criteria (BIC) for ARX models.

Usage

bic(y, x, p_max)

Arguments

y

Data vector of time series observations.

x

Matrix of data (every column represents one time series). Specify NULL or "not" if not wanted.

p_max

Maximum number of autoregressive terms to be included.

Value

p

Lag order chosen by BIC.

values

Vector containing values BIc for p = 0 up to p_max.

Examples

Run this code
# NOT RUN {
data <- sim.marx(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3)
bic(data$y, data$x,8)
# }

Run the code above in your browser using DataLab