out_Yobs: Computing observed outcome

View source: R/functions_stats.R

out_YobsR Documentation

Computing observed outcome

Description

Computes the observed outcome vector, given potential outcomes on the exposures

Usage

out_Yobs(z_a, z_b, Y_a, Y_b)

Arguments

z_a

A binary vector indicating which units are exposed to a.

z_b

A binary vector indicating which units are exposed to b.

Y_a

The potential outcome vector for all units under exposure a.

Y_b

The potential outcome vector for all units under exposure b.

Value

A single observed outcome vector.

Examples

Za <- c(1,1,0)
Zb <- c(0,0,1)
# Za and Zb tells us that the first and second individual are exposed to \code{a},
# while the third individual is exposed to \code{b}.
Ya <- rep(0,3)
Yb <- Ya + 1
# Ya and Yb tells us that all individuals have potential outcome 0 if exposed to \code{a}, 1 if exposed to \code{b}
out_Yobs(Za, Zb, Ya, Yb) # this is what we observed in this trial.
[1] 0 0 1

dpuelz/CliqueRT documentation built on Jan. 6, 2023, 11:20 p.m.