powered by
Join two stages in a staged event tree object, updating probabilities and log-likelihood accordingly.
join_stages(object, var, s1, s2)join_stages_unsafe(object, var, s1, s2)join_all(object, var, stages, ignore = NULL)
join_stages_unsafe(object, var, s1, s2)
join_all(object, var, stages, ignore = NULL)
the staged event tree where s1 and s2 are joined.
s1
s2
an object of class sevt.
sevt
variable.
first stage.
second stage.
a vector of stage names for variable var.
var
vector of stages which will be ignored and left untouched.
This function joins two stages associated to the same variable, updating probabilities and log-likelihood if the object was fitted.
model <- full(PhDArticles, lambda = 0) model <- stages_fbhc(model) model$stages$Kids model <- join_stages(model, "Kids", "5", "6") model$stages$Kids
Run the code above in your browser using DataLab