var_center {rddapp}R Documentation

Assignment Centering for Multivariate Frontier Regression Discontinuity

Description

var_center computes the univariate assignment variable, x based on the cutoffs of two assignment variables: x1 and x2. 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 first column is x1 and the second column is x2.

cut

A numeric vector of length 2 containing the cutpoints at which assignment to the treatment is determined. The default is c(0, 0).

t.design

A character vector of length 2 specifying the treatment option according to design. The first entry is for x1 and the second entry is for x2. Options are "g" (treatment is assigned if x1 is greater than its cutoff), "geq" (treatment is assigned if x1 is greater than or equal to its cutoff), "l" (treatment is assigned if x1 is less than its cutoff), and "leq" (treatment is assigned if x1 is less than or equal to its cutoff). The same options are available for x2.

t.plot

A logical value indicating whether to calculate the univariate treatment variable, t, and make a plot. The default is FALSE.

Value

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


[Package rddapp version 1.3.2 Index]