Description Usage Arguments Value Note See Also Examples
Estimate bandwidth for sharp RD based on local polynomial regression that optimizes either maximum mean squared error, or length or quantiles of excess length of a honest CI under second order Hölder or Taylor class.
1 2 3 
formula 
object of class 
data 
optional data frame, list or environment (or object coercible by

subset 
optional vector specifying a subset of observations to be used in the fitting process. 
cutoff 
specifies the RD cutoff in the running variable. 
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 
na.action 
function which indicates what should happen when the data
contain 
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.

Returns an object of class "RDBW"
. The function print
can be used to obtain and print a summary of the results. An object of
class "RDBW"
is a list containing the following components:
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 just above and just below cutoff, σ^2_+(0) and σ^2_{}(0)
f0
estimate of density of running variable at cutoff, if bandwidth computed using asymptotic method
call
the matched call
na.action
(where relevant) information on handling of missing data.
subset
is evaluated in the same way as variables in formula
,
that is first in data
and then in the environment of formula
.
1 2 3 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.