rddtools (version 0.4.0)

plotBin: Bin plotting

Description

Do a 'scatterplot bin smoothing'

Usage

plotBin(x, y, h = 0.05, 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.