Learn R Programming

mixvlmc (version 0.2.1)

covariate_depth: Maximal covariate memory of a VLMC with covariates

Description

This function return the longest covariate memory used by a VLMC with covariates.

Usage

covariate_depth(model)

Value

the longest covariate memory of this model

Arguments

model

a covlmc object

Examples

Run this code
pc <- powerconsumption[powerconsumption$week == 5, ]
dts <- cut(pc$active_power, breaks = c(0, quantile(pc$active_power, probs = c(0.5, 1))))
m_nocovariate <- vlmc(dts)
dts_cov <- data.frame(day_night = (pc$hour >= 7 & pc$hour <= 17))
m_cov <- covlmc(dts, dts_cov, min_size = 10)
covariate_depth(m_cov)

Run the code above in your browser using DataLab