rddapp (version 1.1.0)

var_center: Assignment Centering for Multivariate Frontier Regression Discontinuity

Description

var_center computes the univariate assignment variable X based on the cutoffs of 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:::var_center().

Usage

var_center(x, cut = c(0, 0), t.design = NULL, t.plot = FALSE)

Arguments

x

Data frame or matrix of two assignment variables, where the 1st column is X1, the 2nd column is X2

cut

Cutoffs of two assignment variables X1, X2.

t.design

The treatment option according to design. The 1st entry is for x1: "g" means treatment is assigned if x1 is greater than its cutoff, "geq" means treatment is assigned if x1 is greater than or equal to its cutoff, "l" means treatment is assigned if x1 is less than its cutoff, "leq" means treatment is assigned if x1 is less than or equal to its cutoff. The 2nd entry is for x2.

t.plot

Whether calculate the univariate treatment variable T and make a plot

Value

var_center returns the univariate assignment variable as a vector according to the design.