Skip to contents

plot.mfrd plots a 3D illustration of the bivariate frontier regression discontinuity design (RDD).

Usage

# S3 method for mfrd
plot(
  x,
  model = c("m_s", "m_h", "m_t"),
  methodname = c("Param", "bw", "Half-bw", "Double-bw"),
  gran = 10,
  raw_data = TRUE,
  color_surface = FALSE,
  ...
)

Arguments

x

An mfrd object returned by mfrd_est or contained in the object returned by mrd_est.

model

A string containing the model specification. Options include one of c("m_s", "m_h", "m_t"), which denote the complete model, heterogeneous treatment model, and treatment only model, respectively.

methodname

A string containing the method specification. Options include one of c("Param", "bw", "Half-bw", "Double-bw").

gran

A non-negative integer specifying the granularity of the surface grid (i.e. the desired number of predicted points before and after the cutoff, along each assignment variable). The default is 10.

raw_data

A logical value indicating whether the raw data points are plotted. The default is TRUE.

color_surface

A logical value indicating whether the treated surface is colored. The default is FALSE.

...

Additional graphic arguments passed to persp.

Examples

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)
model <- mrd_est(y ~ x1 + x2, cutpoint = c(0, 0), t.design = c("geq", "geq"))
plot(model$front$tau_MRD, "m_s", "Param")