View source: R/sevt_simplify.R
sevt_simplify | R Documentation |
Function to simplify a staged tree model.
sevt_simplify(object, fit = TRUE)
object |
an object of class |
fit |
logical, if |
The simplify
function will produce the corresponding simple
staged tree, that is a staged tree where stages and positions are
equivalent.
To do so the function ceg
is used to compute positions, and
then the stages' vectors are replaced with the positions' vectors.
The model is the re-fitted if the input was a fitted staged tree.
Despite the name, the simplified staged tree has always a number
of stages greater or equal to the initial staged tree, thus it is
a more complex statistical model.
an object of class sevt
representing the simplified model.
The returned model will be fitted if the input model
was.
mod <- stages_kmeans(full(Titanic), k = 2)
simpl <- sevt_simplify(mod)
plot(simpl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.