View source: R/4-model-selection.R
join_unobserved | R Documentation |
Join situations with no observations
join_unobserved( object, fit = TRUE, trace = 0, name = "UNOBSERVED", scope = sevt_varnames(object)[-1], lambda = object$lambda )
object |
an object of class |
fit |
if TRUE update model's probabilities. |
trace |
if |
name |
character, name for the new stage storing unobserved situations. |
scope |
character vector, list of variables in |
lambda |
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
.
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.
DD <- generate_xor_dataset(n = 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.