View source: R/potential_outcomes.R
potential_outcomes | R Documentation |
Compute potential outcomes by randomizing the treatment variable on the given model.
potential_outcomes(object, outcome, treatment)
randomize_sevt(object, treatment, p = NULL, ignore = object$name_unobserved)
object |
a fitted object of class |
outcome |
the outcome variable. |
treatment |
the treatment variable. |
p |
the probabilities of treatment |
ignore |
name of stages to be ignored |
The potential_outcome
function randomize
the treatment variable in
the given staged event tree with the randomize_sevt
function and then compute the conditional probabilities
of the outcome variable given the values of the
treatment variable.
The randomize_sevt
function builds the
staged event tree associated with a randomized experiment over
a matrix with potential outcomes.
model <- stages_bhc(full(Titanic))
potential_outcomes(model, "Survived", "Class")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.