mrd_est | R Documentation |

`mrd_est`

estimates treatment effects in a multivariate regression discontinuity design (MRDD) with two assignment variables,
including the frontier average treatment effect (`tau_MRD`

)
and frontier-specific effects (`tau_R`

and `tau_M`

) simultaneously.

```
mrd_est(
formula,
data,
subset = NULL,
cutpoint = NULL,
bw = NULL,
front.bw = NA,
m = 10,
k = 5,
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; a symbolic description of the model to
be fitted. This is supplied in the
format of |

`data` |
An optional data frame containing the variables in the model. If not found in |

`subset` |
An optional vector specifying a subset of observations to be used in the fitting process. |

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

`bw` |
A vector specifying the bandwidths at which to estimate the RD for non-parametric models.
Possible values are |

`front.bw` |
A non-negative numeric vector of length 3 specifying the bandwidths at which to estimate the RD for each
of three effects models (complete model, heterogeneous treatment model, and treatment only model)
detailed in Wong, Steiner, and Cook (2013). If |

`m` |
A non-negative integer specifying the number of uniformly-at-random samples to draw as search candidates for |

`k` |
A non-negative integer specifying the number of folds for cross-validation to determine |

`kernel` |
A string indicating which kernel to use. Options are |

`se.type` |
This specifies the robust standard error calculation method to use,
from the "sandwich" package. Options are,
as in |

`cluster` |
An optional vector of length n 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` |
A logical value indicating whether to print additional information to
the terminal, including results of instrumental variable regression,
and outputs from background regression models. The default is |

`less` |
Logical. If |

`est.cov` |
Logical. If |

`est.itt` |
Logical. If |

`local` |
A non-negative numeric value specifying the range of neighboring points around the cutoff on the standardized scale, for each assignment variable. The default is 0.15. |

`ngrid` |
A non-negative integer specifying the number of non-zero grid points on each assignment variable, which is also the number of zero grid points on each assignment variable. The default is 250. The value used in Wong, Steiner and Cook (2013) is 2500, which may cause long computational time. |

`margin` |
A non-negative numeric value specifying the range of grid points beyond the minimum and maximum of sample points on each assignment variable. The default is 0.03. |

`boot` |
An optional non-negative integer specifying the number of bootstrap samples to obtain standard error of estimates.
This argument is not optional if method is |

`method` |
A string specifying the method to estimate the RD effect. Options are |

`t.design` |
A character vector of length 2 specifying the treatment option according to design.
The first entry is for |

`stop.on.error` |
A logical value indicating whether to remove bootstraps which cause error in the |

`mrd_est`

returns an object of class "`mrd`

".
The function `summary`

is used to obtain and print a summary of the
estimated regression discontinuity. The object of class `mrd`

is a list
containing the following components for each estimated treatment effect,
`tau_MRD`

or `tau_R`

and `tau_M`

:

`type` |
A string denoting either |

`call` |
The matched call. |

`est` |
Numeric vector of the estimate of the discontinuity in the outcome under a sharp MRDD or the Wald estimator in the fuzzy MRDD, for each corresponding bandwidth, if applicable. |

`se` |
Numeric vector of the standard error for each corresponding bandwidth, if applicable. |

`ci` |
The matrix of the 95 for each corresponding bandwidth, if applicable. |

`bw` |
Numeric vector of each bandwidth used in estimation. |

`z` |
Numeric vector of the z statistic for each corresponding bandwidth, if applicable. |

`p` |
Numeric vector of the p-value for each corresponding bandwidth, if applicable. |

`obs` |
Vector of the number of observations within the corresponding bandwidth, if applicable. |

`cov` |
The names of covariates. |

`model` |
For a sharp design, a list of the |

`frame` |
Returns the model frame used in fitting. |

`na.action` |
The observations removed from fitting due to missingness. |

`impute` |
A logical value indicating whether multiple imputation is used or not. |

`d` |
Numeric vector of the effect size (Cohen's d) for each estimate. |

Wong, V. C., Steiner, P. M., Cook, T. D. (2013). Analyzing regression-discontinuity designs with multiple assignment variables: A comparative study of four estimation methods. Journal of Educational and Behavioral Statistics, 38(2), 107-141. https://journals.sagepub.com/doi/10.3102/1076998611432172.

Imbens, G., Kalyanaraman, K. (2009). Optimal bandwidth choice for the regression discontinuity estimator (Working Paper No. 14726). National Bureau of Economic Research. https://www.nber.org/papers/w14726.

Imbens, G., Kalyanaraman, K. (2012). Optimal bandwidth choice for the regression discontinuity estimator. The Review of Economic Studies, 79(3), 933-959. https://academic.oup.com/restud/article/79/3/933/1533189.

Lee, D. S., Card, D. (2010). Regression discontinuity inference with specification error. Journal of Econometrics, 142(2), 655-674. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jeconom.2007.05.003")}.

Lee, D. S., Lemieux, T. (2010). Regression Discontinuity Designs in Economics. Journal of Economic Literature, 48(2), 281-355. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1257/jel.48.2.281")}.

Zeileis, A. (2006). Object-oriented computation of sandwich estimators. Journal of Statistical Software, 16(9), 1-16. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v016.i09")}

```
set.seed(12345)
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"))
```

rddapp documentation built on April 6, 2023, 1:15 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.