sevt_add | R Documentation |
Return an updated staged event tree with one additional variable at the end of the tree.
sevt_add(object, var, data, join_unobserved = TRUE, useNA = "ifany")
object |
an object of class |
var |
character, the name of the new variable to be added. |
data |
either a |
join_unobserved |
logical, passed to |
useNA |
whether to include NA values in the tables.
Argument passed to |
This function update a staged event tree object with an additional variable. The stages structure of the new variable is initialized as in the saturated model.
An object of class sevt
representing a
staged event tree model with var
added as last variable.
model <- full(Titanic, order = c("Age", "Class"))
print(model)
model <- sevt_add(model, "Survived", Titanic)
print(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.