rddapp (version 1.1.0)

treat_assign: Treatment Assignment for Regression Discontinuity

Description

treat_assign computes the treatment variable T based on the cutoff of assignment variables X. This is an internal function and is typically not directly invoked by the user. It can be accessed using the triple colon, as in rddapp:::treat_assign().

Usage

treat_assign(x, cut = 0, t.design = "l")

Arguments

x

The vector of assignment variable X.

cut

The cutoff of assignment variables X.

t.design

The treatment option according to design. The entry is for X: "g" means treatment is assigned if X is greater than its cutoff, "geq" means treatment is assigned if X is greater than or equal to its cutoff, "l" means treatment is assigned if X is less than its cutoff, "leq" means treatment is assigned if X is less than or equal to its cutoff.

Value

treat_assign returns the treatment variable as a vector according to the design, where 1 means the treated group, and 0 means the control group.