SnoopingCV: Snooping-adjusted critical value

Description Usage Arguments Value Examples

Description

Look up appropriate snooping-adjusted critical value or coverage of an unadjusted confidence band in a table of pre-computed critical values. If no pre-computed value is found, calculate appropriate critical value by Monte Carlo simulation.

Usage

1
2
SnoopingCV(bwratio, kernel, boundary, order, onesided = FALSE,
  coverage = FALSE, alpha = 0.05, S = 10000, T = 1000)

Arguments

bwratio

ratio of maximum to minimum bandwidth, number greater than 1

kernel

Either one of "uniform", "triangular", or "epanechnikov", or else an (equivalent) kernel function

boundary, order

Logical specifying whether regression is in the interior or on the boundary, and an integer specifying order of local polynomial. If kernel is "uniform", "triangular", or "epanechnikov", the appropriate boundary or interior equivalent kernel is used. If kernel is a function, these options are ignored.

onesided

Logical specifying whether the critical value corresponds to a one-sided confidence interval.

coverage

Return coverage of unadjusted CIs instead of a critical value?

alpha

number specifying confidence level, 0.05 by default.

S

number of draws of the Gaussian process \hat{\mathbb{H}}(h)

T

number of draws from a normal distribution in each draw of the Gaussian process

Value

critical value

Examples

1
2
3
4
5
6
7
8
## look up appropriate 99% critical value for a regression
## discontinuity design using a triangular kernel and local linear regression,
## with ratio of maximum to minimum bandwidths equal to 6.2
SnoopingCV(6.2, "triangular", boundary=TRUE, order=1, alpha=0.01)
## Values greater than 100 one will need to be computed:
SnoopingCV(110, "triangular", boundary=TRUE, order=1, alpha=0.01)
## Equivalently, specify equivalent kernel explicitly
SnoopingCV(110, function(u) 6*(1 - 2*u) * (1 - u) * (u<=1), alpha=0.01)

kolesarm/BWSnooping documentation built on May 20, 2019, 12:54 p.m.