Learn R Programming

VLMCX (version 1.0)

draw: Draw the Variable Length Markov Chain estimated model

Description

Draws the rooted tree corresponding to the estimated contexts in a VLMCX object.

Usage

draw(fit, title = "VLMCX Context Tree", print.coef = TRUE)

Value

No return value, called for plotting only.

Arguments

fit

a VLMCX object.

title

the title in the graph.

print.coef

It TRUE the algorithm prints in the console the list of all contexts and their corresponding alpha and beta coefficients for the multinomial regression. If FALSE, the algorithm prints in the console a text version of the rooted context tree.

Author

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

Details

The graph contains circles corresponding to the estimated nodes of the contexts estimated by the algorithm but does not include the structure and covariate parameter vectors.

Examples

Run this code

# \donttest{
n = 1000
d = 2
set.seed(1)
X = cbind(rnorm(n), rnorm(n))

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

draw(fit)

fit = VLMCX(y, X, alpha.level = 0.0001, max.depth = 3, n.min = 15, trace = TRUE)
draw(fit)

draw(fit, print.coef = FALSE)
# }


Run the code above in your browser using DataLab