model {mixvlmc} | R Documentation |
Logistic model of a COVLMC context
Description
This function returns a representation of the logistic model associated to a COVLMC context from its node in the associated context tree.
Usage
model(node, type = c("coef", "full"))
Arguments
node |
A |
type |
specifies the model information to return, either the
coefficients only ( |
Details
Full model extraction is only possible if the COVLMC model what not fully
trimmed (see trim.covlmc()
). Notice that find_sequence.covlmc()
can
produce node that are not context: in this case this function return NULL
.
Value
if node
is a context, the coefficients of the logistic model (as a
vector or a matrix depending on the size of the state space) or a logistic
model as a R object. If node
is not a context, NULL
.
Examples
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))
m_cov <- covlmc(dts, dts_cov, min_size = 10)
vals <- states(m_cov)
node <- find_sequence(m_cov, c(vals[1], vals[1]))
node
model(node)
model(node, type = "full")