powered by
Compute (marginal) probabilities of elementary events with respect to the probability encoded in a staged event tree.
prob(object, x, log = FALSE, na0 = TRUE)
an object of class sevt with probabilities.
sevt
the vector or data.frame of observations.
logical, if TRUE log-probabilities are returned.
TRUE
logical, if NA should be converted to 0.
NA
the probabilities to observe each observation given in x.
x
Computes probabilities related to a vector or a data.frame of observations.
# NOT RUN { DD <- generate_random_dataset(5, 100) model <- full(DD, lambda = 1) pr <- prob(model, expand.grid(model$tree[c(2, 3, 4)])) sum(pr) prob(model, DD[1:10, ]) # }
Run the code above in your browser using DataLab