plot.gprd: Plot Gaussian Process Regression for Regression Discontinuity

Description Usage Arguments Value See Also

View source: R/plot.gprd.R

Description

Plot Gaussian Process Regression for Regression Discontinuity

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S3 method for class 'gprd'
plot(
  x,
  from = "data_min",
  to = "data_max",
  n_points = NULL,
  ci_width = 0.95,
  data_color = "#1c1c1c1c",
  line_color = "black",
  ci_color = "#87878787",
  plot_cutoff = TRUE,
  main_title = "",
  xlab = "",
  ylab = "",
  ...
)

Arguments

x

A object of class gprd

from

The lowest x value to plot prediction for. The default, "data_min", uses the lowest forcing variable observed value. If both from and to are NULL, only values in the training data and at the cutoff are plotted. Otherwise a numeric vector of length one should be given.

to

The highest x value to plot prediction for. The default "data_max" uses the largest forcing variable observed value. If both from and to are NULL, only values in the training data and at the cutoff are plotted. Otherwise a numeric vector of length one should be given.

n_points

An integer vector of length one giving the number of prediction points to plot; if NULL and from and to are given, n_points = length(seq(from = from, to = to, by = 0.01))

ci_width

A numeric vector of length one between 0 and 1 giving the width of the confidence interval for tau

data_color

A color to plot the data points in

line_color

A color to plot the predictive mean line in

ci_color

A color to plot the CI polygon in

plot_cutoff

A logical vector of length one; if TRUE, a dashed vertical line (lty = 2) marks the cutoff; default is TRUE

main_title

A character vector of length one giving a main title for the plot

xlab

A character vector of length one giving a title for the x axis

ylab

A character vector of length one giving a title for the y axis

...

Other arguments passed to plot

Value

Returns NULL invisibly

See Also

gprd


duckmayr/gprd documentation built on Dec. 27, 2020, 7:33 a.m.