plotBin {rddtools}R Documentation

Bin plotting

Description

Do a 'scatterplot bin smoothing'

Usage

plotBin(
  x,
  y,
  h = NULL,
  nbins = NULL,
  cutpoint = 0,
  plot = TRUE,
  type = c("value", "number"),
  xlim = range(x, na.rm = TRUE),
  cex = 0.9,
  main = NULL,
  xlab,
  ylab,
  ...
)

Arguments

x

Forcing variable

y

Output

h

the bandwidth (defaults to 2*sd(runvar)*length(runvar)^(-.5))

nbins

number of Bins

cutpoint

Cutpoint

plot

Logical. Whether to plot or only returned silently

type

Whether returns the y averages, or the x frequencies

xlim, cex, main, xlab, ylab

Usual parameters passed to plot(), see par

...

further arguments passed to plot.

Value

Returns silently values

References

McCrary, Justin.


[Package rddtools version 1.6.0 Index]