Learn R Programming

mixvlmc (version 0.2.1)

cutoff.ctx_node: Cut off value for pruning a node in the context tree of a VLMC

Description

This function returns the cut off value associated to a specific node in the context tree interpreted as a VLMC. The node is represented by a ctx_node object as returned by find_sequence() or contexts(). For details, see cutoff.vlmc().

Usage

# S3 method for ctx_node
cutoff(model, scale = c("quantile", "native"), raw = FALSE, ...)

Value

a cut off value

Arguments

model

a ctx_node object as returned by find_sequence()

scale

specify whether the results should be "native" log likelihood ratio values or expressed in a "quantile" scale of a chi-squared distribution (defaults to "quantile").

raw

specify whether the returned values should be limit values computed in the model or modified values that guarantee pruning (see details in cutoff.vlmc())

...

additional arguments for the cutoff function.

See Also

cutoff()

Examples

Run this code
pc <- powerconsumption[powerconsumption$week == 5, ]
dts <- cut(pc$active_power, breaks = c(0, quantile(pc$active_power, probs = c(0.25, 0.5, 0.75, 1))))
model <- vlmc(dts)
model_ctxs <- contexts(model)
cutoff(model_ctxs[[1]])
cutoff(model_ctxs[[2]], scale = "native", raw = TRUE)

Run the code above in your browser using DataLab