Description Usage Arguments Value References Examples
mrd_est
estimates treatment effects in an MRDD with two assignment variables,
including the frontier average treatment effect (tau_MRD)
and frontierspecific effects (tau_R and tau_M) simultaneously.
1 2 3 4 5 6  mrd_est(formula, data, subset = NULL, cutpoint = NULL, bw = NULL,
kernel = "triangular", se.type = "HC1", cluster = NULL,
verbose = FALSE, less = FALSE, est.cov = FALSE, est.itt = FALSE,
local = 0.15, ngrid = 250, margin = 0.03, boot = NULL,
method = c("center", "univ", "front"), t.design = NULL,
stop.on.error = TRUE)

formula 
The formula of the MRDD. This is supplied in the
format of 
data 
An optional data frame. 
subset 
An optional vector specifying a subset of observations to be used. 
cutpoint 
The cutpoint. If omitted, it is assumed to be c(0, 0). 
bw 
A numeric vector specifying the bandwidths at which to estimate the RD.
If omitted or it is 
kernel 
A string specifying the kernel to be used in the local linear fitting.

se.type 
This specifies the robust SE calculation method to use. Options are,
as in 
cluster 
An optional vector specifying clusters within which the errors are assumed
to be correlated. This will result in reporting cluster robust SEs. This option overrides
anything specified in 
verbose 
Will provide some additional information printed to the terminal. 
less 
Logical. If 
est.cov 
Logical. If 
est.itt 
Logical. If 
local 
The range of neighboring points around the cutoff on the standardized scale on each assignment variable, which is a positive number. 
ngrid 
The number of nonzero grid points on each assignment variable, which is also the number of zero grid points on each assignment variable. Value used in Wong, Steiner and Cook (2013) is 2500, which may cause long computational time. 
margin 
The range of grid points beyond the minimum and maximum of sample points on each assignment variable. 
boot 
The number of bootstrap samples to obtain standard error of estimates. 
method 
The method to estimate rd effect. Options are 
t.design 
The treatment option according to design.
The 1st entry is for X1: 
stop.on.error 
Logical. If 
mrd_est
returns an object of class "mrd
".
Wong, V. C., Steiner, P. M., Cook, T. D. (2013). Analyzing regressiondiscontinuity designs with multiple assignment variables: A comparative study of four estimation methods. Journal of Educational and Behavioral Statistics, 38(2), 107141. http://journals.sagepub.com/doi/10.3102/1076998611432172.
1 2 3 4 5 6 7 8 9 10  x1 < runif(1000, 1, 1)
x2 < runif(1000, 1, 1)
cov < rnorm(1000)
y < 3 + 2 * (x1 >= 0) + 3 * cov + 10 * (x2 >= 0) + rnorm(1000)
# centering
mrd_est(y ~ x1 + x2  cov, method = "center", t.design = c("geq", "geq"))
# univariate
mrd_est(y ~ x1 + x2  cov, method = "univ", t.design = c("geq", "geq"))
# frontier
mrd_est(y ~ x1 + x2  cov, method = "front", t.design = c("geq", "geq"))

$center
$center$tau_MRD
Call:
rd_est(formula = Y ~ X  cov, data = data, subset = NULL, cutpoint = 0,
bw = bw, kernel = "triangular", se.type = se.type, cluster = cluster,
verbose = verbose, less = less, est.cov = est.cov, est.itt = FALSE,
t.design = "leq")
Coefficients:
Linear Quadratic Cubic Opt HalfOpt DoubleOpt
6.806 6.643 5.384 6.766 6.342 6.792
$call
mrd_est(formula = y ~ x1 + x2  cov, method = "center", t.design = c("geq",
"geq"))
attr(,"class")
[1] "mrd"
$univ
$univ$tau_R
Call:
rd_est(formula = Y ~ X1  cov, data = data, subset = subset1,
cutpoint = 0, bw = NULL, kernel = "triangular", se.type = se.type,
cluster = cluster, verbose = verbose, less = less, est.cov = est.cov,
est.itt = FALSE, t.design = "geq")
Coefficients:
Linear Quadratic Cubic Opt HalfOpt DoubleOpt
2.200 2.108 2.280 2.198 2.035 2.194
$univ$tau_M
Call:
rd_est(formula = Y ~ X2  cov, data = data, subset = subset2,
cutpoint = 0, bw = NULL, kernel = "triangular", se.type = se.type,
cluster = cluster, verbose = verbose, less = less, est.cov = est.cov,
est.itt = FALSE, t.design = "geq")
Coefficients:
Linear Quadratic Cubic Opt HalfOpt DoubleOpt
10.51 10.57 10.90 10.59 10.77 10.52
$call
mrd_est(formula = y ~ x1 + x2  cov, method = "univ", t.design = c("geq",
"geq"))
attr(,"class")
[1] "mrd"
$front
$front$tau_MRD
Call:
mfrd_est(y = Y, x1 = X1, x2 = X2, c1 = 0, c2 = 0, t.design = c("geq",
"geq"), local = 0.15, ngrid = ngrid, margin = margin, boot = boot,
cluster = cluster, stop.on.error = stop.on.error)
Coefficients:
ev1 ev2 ate htev1 htev2 htate tev1 tev2 tate
1.781 10.621 5.821 1.948 10.661 5.931 3.837 3.837 3.837
$call
mrd_est(formula = y ~ x1 + x2  cov, method = "front", t.design = c("geq",
"geq"))
attr(,"class")
[1] "mrd"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.