potential_outcomes: Potential Outcomes

View source: R/potential_outcomes.R

potential_outcomesR Documentation

Potential Outcomes

Description

Compute potential outcomes by randomizing the treatment variable on the given model.

Usage

potential_outcomes(object, outcome, treatment)

randomize_sevt(object, treatment, p = NULL, ignore = object$name_unobserved)

Arguments

object

a fitted object of class sevt.

outcome

the outcome variable.

treatment

the treatment variable.

p

the probabilities of treatment

ignore

name of stages to be ignored

Details

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

Value

a matrix with potential outcomes.

Examples

model <- stages_bhc(full(Titanic))
potential_outcomes(model, "Survived", "Class")

gherardovarando/stagedtrees documentation built on July 5, 2025, 12:35 a.m.