fpa_density_boot: Bootstrap confidence intervals and bands for any...

View source: R/fpa_density_boot.R

fpa_density_bootR Documentation

Bootstrap confidence intervals and bands for any private-value density estimator

Description

Pointwise percentile intervals and a uniform confidence band for the private-value density estimated by any [fpa_density()] method, for example the quantile-based estimator of Marmer and Shneyerov (2012) or the wavelet estimators. The whole two-step procedure (first stage, unit map, second stage) is repeated on 'B' bootstrap samples. The uniform band is \hat f(x) \pm c^*\,\hat\sigma^*(x), with \hat\sigma^* the bootstrap standard deviation and c^* the 1-\alpha quantile of \sup_x |\hat f^*(x) - \hat f(x)|/\hat\sigma^*(x). For the GPV estimator, [fpa_density_ci()] gives the analytic studentisation of Ma, Marmer and Shneyerov (2019).

The percentile bootstrap reproduces the variability of the estimator but not its smoothing bias, so at the usual bandwidths the intervals can under-cover in moderate samples (in a small check with the Marmer–Shneyerov estimator, 240 bids and nominal level 0.95, pointwise coverage was about 0.86). Undersmoothing, i.e. a smaller bandwidth than is optimal for estimation, is the usual remedy.

Usage

fpa_density_boot(
  bids,
  n = NULL,
  method = "marmer_shneyerov",
  x = NULL,
  B = 199,
  level = 0.95,
  resample = c("bids", "auctions", "blocks"),
  L = "auto",
  ...
)

## S3 method for class 'fpa_density_boot'
plot(x, true = NULL, ...)

Arguments

bids

pooled bids (vector) or an 'L' by 'n' matrix.

n

bidders per auction (from 'ncol(bids)' for a matrix).

method

second-stage estimator; see Description.

x

evaluation grid on the value scale. Defaults to 200 points spanning the pseudo-values (excluding the extreme 0.5 percent at each end).

B

number of bootstrap replications.

level

confidence level.

resample

'"bids"' (pooled bids with replacement) or '"auctions"' (whole auctions; requires a bid matrix).

L

block length when 'resample = "blocks"': '"auto"' for the rule of [block_length_auto()], or an integer. Ignored by the other schemes.

...

further arguments to [fpa_density()] (e.g. 'j0', 'h', 'first_stage').

true

optional true density function (simulated data).

Details

If the auctions have a time order and the same bidders recur, resampling auctions or bids independently understates the sampling uncertainty, in proportion to the dependence; use 'resample = "blocks"' in that case.

Value

an object of class '"fpa_density_boot"' with 'x', 'f', 'se', 'lower', 'upper' (pointwise), 'band_lower', 'band_upper', 'crit', 'level', 'method', 'B' and the matrix 'boot' of bootstrap estimates.

Reproducibility

Call [set.seed()] beforehand to make the bootstrap reproducible.

Examples


set.seed(1)
sim <- fpa_simulate(60, 4, Q = function(u) qbeta(u, 2, 2))
bb <- fpa_density_boot(sim$bids, method = "marmer_shneyerov",
                       x = seq(0.15, 0.85, by = 0.05), B = 49)
bb
plot(bb, true = function(v) dbeta(v, 2, 2))


qdfauction documentation built on Nov. 10, 2026, 5:07 p.m.