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().
treat_assign(x, cut = 0, t.design = "l")
The vector of assignment variable X.
The cutoff of assignment variables X.
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.
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.