BIC {VLMCX} | R Documentation |
VLMCX
objects that compose Variable Length Markov Chains with Exogenous Covariates
Computes the Bayesian Information Criteria for the data using the estimated parameters of the multinomial logistic regression in the VLMCX fit.
BIC(fit)
fit |
a betaVLMC object. |
a numeric value with the corresponding BIC.
Adriano Zanin Zambom <adriano.zambom@csun.edu>
set.seed(1)
n = 1000
d = 2
X = cbind(rnorm(n), rnorm(n))
p = 1/(1 + exp(0.5 + -2*X[,1] - 3.5*X[,2]))
y = c(sample(1:0,1), rbinom(n,1, p))
fit = maximum.context(y[1:n], X, max.depth = 3, n.min = 25)
draw(fit)
BIC(fit)
##[1] 696.0343
fit = VLMCX(y[1:n], X, alpha.level = 0.001, max.depth = 3, n.min = 25)
draw(fit)
BIC(fit)
##[1] 588.9432