knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "70%"
)

vlmcmethods

Methods for Variable-Length Markov Chain models...

Installation

Install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("Freguglia/vlmcmethods")

Example

library(vlmcmethods)
# Example dataset format
str(binchain)

# Fitting VLMC via context algorithm
fit <- vlmcfit(binchain, Hmax = 8, cutoff = 10)
fit
summary(fit)

# Plotting trees
plot(fit)

# Obtain a tbl_graph object from the fitted tree (string)
graph <- tree_graph(fit)
graph
# You can use this object within the 'ggraph' package to create 
# custom visualizations


Freguglia/vlmcmethods documentation built on Dec. 17, 2021, 8:32 p.m.