Skip to contents

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

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.

Value

a cut off value

See also

Examples

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]])
#> [1] 0.01049483
cutoff(model_ctxs[[2]], scale = "native", raw = TRUE)
#> [1] 0.4758802