Skip to contents

This generic function converts an object into a covlmc.

Usage

as_covlmc(x, ...)

# S3 method for tune_covlmc
as_covlmc(x, ...)

Arguments

x

an object to convert into a covlmc.

...

additional arguments for conversion functions.

Value

a covlmc

See also

Examples

## conversion from the results of tune_covlmc
pc <- powerconsumption[powerconsumption$week == 5, ]
dts <- cut(pc$active_power, breaks = c(0, quantile(pc$active_power, probs = c(0.5, 1))))
dts_cov <- data.frame(day_night = (pc$hour >= 7 & pc$hour <= 17))
dts_best_model_tune <- tune_covlmc(dts, dts_cov)
dts_best_model <- as_covlmc(dts_best_model_tune)
draw(dts_best_model)
#> * (collapsing: 1.328e-190)
#> +-- (0,1.34] (0.1957 [ -2.533 ])
#> '-- (1.34,7.54] (0.8175 [ 2.535 ])