View source: R/functions_stats.R
out_Yobs | R Documentation |
Computes the observed outcome vector, given potential outcomes on the exposures
out_Yobs(z_a, z_b, Y_a, Y_b)
z_a |
A binary vector indicating which units are exposed to |
z_b |
A binary vector indicating which units are exposed to |
Y_a |
The potential outcome vector for all units under exposure |
Y_b |
The potential outcome vector for all units under exposure |
A single observed outcome vector.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.