zeroEffect | R Documentation |
Calculates potential outcomes under modified assignments, assuming zero treatment effect(s).
zeroEffect(y, w, w_new)
y |
a vector or matrix of outcomes. |
w |
a vector or matrix of assignments. |
w_new |
a vector or matrix of modified assignments. |
A vector of potential outcomes under the modified assignments.
Joseph J. Lee and Tirthankar Dasgupta
constEffect
# Assignments w <- c(0, 0, 0, 0, 0, 1, 1, 1, 1, 1) # Modified Assignments w_new <- c(1, 1, 1, 1, 1, 0, 0, 0, 0, 0) # Outcomes y <- c(4, 6, 5, 7, 4, 7, 11, 9, 8, 12) zeroEffect(y, w, w_new) # Returns y as is
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.