Learn R Programming

randomizationInference (version 1.0.1)

zeroEffect: Potential Outcomes With Zero Treatment Effects

Description

Calculates potential outcomes under modified assignments, assuming zero treatment effect(s).

Usage

zeroEffect(y, w, w_new)

Arguments

y
a vector or matrix of outcomes.
w
a vector or matrix of assignments.
w_new
a vector or matrix of modified assignments.

Value

  • A vector of potential outcomes under the modified assignments.

See Also

constEffect

Examples

Run this code
## 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

Run the code above in your browser using DataLab