Last chance! 50% off unlimited learning
Sale ends in
Join situations with no observations
join_unobserved(
object,
fit = TRUE,
trace = 0,
name = "UNOBSERVED",
scope = sevt_varnames(object)[-1],
lambda = object$lambda
)
a staged event tree with at most one stage per variable with
no observations.
If, as default, fit=TRUE
the model will be re-fitted, if
fit=FALSE
probabilities in the output model are not estimated.
an object of class sevt
with associated data.
if TRUE update model's probabilities.
if > 0
print information to console.
character, name for the new stage storing unobserved situations.
character vector, list of variables in object
.
smoothing parameter for the fitting.
It takes as input a (fitted) staged event tree object and it joins, in the same stage, all the situations with zero recorded observations. Since such joining does not change the log-likelihood of the model, it is a useful (time-wise) pre-processing prior to others model selection algorithms.
Unobserved situations can be joined directly in
full
or indep
, by setting
join_unobserved = TRUE
.
DD <- generate_xor_dataset(p = 5, n = 10)
model_full <- full(DD, lambda = 1, join_unobserved = FALSE)
model <- join_unobserved(model_full)
logLik(model_full)
logLik(model)
BIC(model_full, model)
Run the code above in your browser using DataLab