context.algorithm {VLMCX}R Documentation

Context Algorithm using exogenous covariates

Description

Prunes the given tree according to the significance of the covariates and the contexts that are determined by a multinomial regression.

Usage

context.algorithm(fit, node, alpha.level = 0.05, max.depth = 5, n.min = 5, trace = FALSE)

Arguments

fit

a VLMCX object

node

The top most node up to which the prunning is allowed.

alpha.level

the alpha level for rejection of each hypothesis in the algorithm.

max.depth

the maximum depth of the initial "maximal" tree.

n.min

minimum number of observations for each parameter needed in the estimation of that context

trace

if trace == TRUE then information is printed during the running of the prunning algorithm.

Value

context.algorithm returns an object of class "VLMCX". The generic functions coef, AIC,BIC, draw, and LogLik extract various useful features of the fitted object 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 = 500

X = cbind(rnorm(n), rnorm(n))
y = rbinom(n,1,.5)

fit = maximum.context(y, X, max.depth = 3)
pruned.fit = context.algorithm(fit, fit$tree)
draw(pruned.fit)


[Package VLMCX version 1.0 Index]