Description Usage Arguments Value Examples
Basic computing engine called by RDOptBW
used to find
optimal bandwidth
1 2 3  RDOptBW.fit(d, M, kern = "triangular", opt.criterion, bw.equal = TRUE,
alpha = 0.05, beta = 0.8, sclass = "H", order = 1,
se.initial = "IKEHW")

d 
object of class 
M 
Bound on second derivative of the conditional mean function. 
kern 
specifies kernel function used in the local regression. It can
either be a string equal to 
opt.criterion 
Optimality criterion that bandwidth is designed to optimize. It can either be based on exact finitesample maximum bias and finitesample estimate of variance, or asymptotic approximations to the bias and variance. The options are:
The finitesample methods use conditional variance given by

bw.equal 
logical specifying whether bandwidths on either side of cutoff should be constrainted to equal to each other. 
alpha 
determines confidence level, 
beta 
Determines quantile of excess length to optimize, if bandwidth optimizes given quantile of excess length of onesided confidence intervals. 
sclass 
Smoothness class, either 
order 
Order of local regression 1 for linear, 2 for quadratic. 
se.initial 
Method for estimating initial variance for computing optimal bandwidth. Ignored if data already contains estimate of variance.

a list with the following elements
hp
bandwidth for observations above cutoff
hm
bandwidth for observations below cutoff, equal to hp
unless bw.equal==FALSE
sigma2m
, sigma2p
estimate of conditional variance
above and below cutoff, from d
1 2 3  ## Lee data
d < RDData(lee08, cutoff=0)
RDOptBW.fit(d, M=0.1, opt.criterion="MSE")[c("hp", "hm")]

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.