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)
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.
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.