treat_assign: Treatment Assignment for Regression Discontinuity

View source: R/treat_assign.R

treat_assignR Documentation

Treatment Assignment for Regression Discontinuity

Description

treat_assign computes the treatment variable, t, based on the cutoff of assignment variable, 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

A numeric vector containing the assignment variable, x.

cut

A numeric value containing the cutpoint at which assignment to the treatment is determined. The default is 0.

t.design

A string specifying the treatment option according to design. Options are "g" (treatment is assigned if x is greater than its cutoff), "geq" (treatment is assigned if x is greater than or equal to its cutoff), "l" (treatment is assigned if x is less than its cutoff), and "leq" (treatment is assigned if x is less than or equal to its cutoff). The default is "l".

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.


rddapp documentation built on March 18, 2022, 6:39 p.m.