Learn R Programming

GNAR (version 0.2.9)

lmToBIC: Calculates the BIC for a GNAR model fit

Description

Returns the value of the BIC for a GNARfit or GNARpredict object.

Usage

lmToBIC(GNARobj.in=GNARpredict())

Arguments

GNARobj.in

output of GNARfit or GNARpredict.

Value

lmToBIC returns the value of the BIC for the input model fit.

Details

For a GNAR(p,[S]) model, the BIC is calculated as $$BIC(p,S) = \ln | \Sigma_{p,S} | + T^{-1} M\ln(T)$$ where \(\Sigma_{p,S}=T^{-1}U'U\), \(U\) is the matrix of residuals, and \(M=np + C\sum_{j=1}^p S_j\) when globalalpha=FALSE, \(M=p + C\sum_{j=1}^p S_j\) when globalalpha=TRUE, and C is the number of factors.

For definiteness, we seek to minimize the BIC. Often, better models have a small BIC.

Examples

Run this code
# NOT RUN {
#BIC for the GNAR(2,[1,1]) model using GNARpredict on fiveVTS
data(fiveNode)
lmToBIC()
# }

Run the code above in your browser using DataLab