Learn R Programming

bayesforecast (version 1.0.5)

bic: Computes posterior sample of the pointwise BIC method from a varstan object

Description

Convenience function for computing the pointwise Bayesian Information Criteria method from a varstan object.

Usage

bic(x)

Value

A numeric array of size R, containing the posterior samples of the aic for a varstan object, where R is the number of iterations. If multiple chains are fitted, then the array is of length M*R, where M is the number of chains

Arguments

x

A varstan object of the time series fitted model.

Author

Asael Alonzo Matamoros

Examples

Run this code

# \donttest{
 model = Sarima(birth,order = c(0,1,2),seasonal = c(1,1,1))
 fit1 = varstan(model,iter = 500,chains = 1)

 bic1 = bic(fit1)
 mean(bic1)
# }

Run the code above in your browser using DataLab