Creates a two-arm design with application for when estimand of interest is conditional on a post-treatment outcome (the effect on Y given R) or data is conditionally observed (Y given R). See Details for more information on the data generating process.

two_arm_attrition_designer(
N = 100,
a_R = 0,
b_R = 1,
a_Y = 0,
b_Y = 1,
rho = 0,
args_to_fix = NULL
)

## Arguments

N An integer. Size of sample. A number. Constant in equation relating treatment to responses. A number. Slope coefficient in equation relating treatment to responses. A number. Constant in equation relating treatment to outcome. A number. Slope coefficient in equation relating treatment to outcome. A number in [0,1]. Correlation between shocks in equations for R and Y. A character vector. Names of arguments to be args_to_fix in design.

## Value

A post-treatment design.

## Details

The data generating process is of the form:

R ~ (a_R + b_R*Z > u_R)

Y ~ (a_Y + b_Y*Z > u_Y)

where u_R and u_Y are joint normally distributed with correlation rho.

## Author

DeclareDesign Team

## Examples

# To make a design using default argument (missing completely at random):
two_arm_attrition_design <- two_arm_attrition_designer()
if (FALSE) {
diagnose_design(two_arm_attrition_design)
}
# Attrition can produce bias even for unconditional ATE even when not
# associated with treatment
if (FALSE) {
diagnose_design(two_arm_attrition_designer(b_R = 0, rho = .3))
}
# Here the linear estimate using R=1 data is unbiased for
# "ATE on Y (Given R)" with b_R = 0 but not when  b_R = 1
if (FALSE) {
diagnose_design(redesign(two_arm_attrition_design, b_R = 0:1, rho = .2))
}