maximum.context {VLMCX}R Documentation

Maximum Context Tree

Description

Build the largest context tree, which is the biggest context tree such that all elements in it have been observed at least n.min times.

Usage

maximum.context(y, X, max.depth = 5, n.min = 5)

Arguments

y

a "time series" vector (numeric, charachter, or factor)

X

Numeric matrix of predictors with rows corresponding to the y observations (over time) and columns corresponding to covariates.

max.depth

Maximum depth of the desired tree.

n.min

Minimum number of observations per coefficient to be estimated.

Value

maximum.context returns an object of class "VLMCX". The generic functions coef, AIC,BIC, draw, and LogLik extract various useful features of the value returned by VLMCX.

An object of class "VLMCX" is a list containing at least the following components:

y

the time series data corresponding to the states inputed by the user.

X

the time series covariates data inputed by the user.

tree

the estimated rooted tree estimated by the algorithm. Each node contains the context, the intercept (alpha) and regression parameters (beta) corresponding to the covariates of that regression and a list child, whose entries are nodes with the same structure.

LogLik

the log-likelihood of the data using the estimated context tree.

baseline.state

the state used as a baseline fore the multinomial regression.

Author(s)

Adriano Zanin Zambom <adriano.zambom@csun.edu>

Examples




n = 1000
d = 2

X = cbind(rnorm(n), rnorm(n))

y = rbinom(n,1,.5)
fit = maximum.context(y, X)


[Package VLMCX version 1.0 Index]