| qdf | R Documentation |
Estimates the quantile density function q(u) = Q'(u) = 1/g(Q(u))
(Parzen 1979; also called the sparsity function, Tukey 1965) from an i.i.d.
sample, with the smoothing parameter chosen by cross-validation. Ten
estimators are available; see [qdf_kernel()], [qdf_poisson()],
[qdf_jones()] and [qdf_wavelet()] for their definitions and the simulation evidence in Doosti,
Dewan and Talebian (2025), where the indirect Poisson estimator with BCV
bandwidth performed best for first-price auction inversion.
qdf(
x,
method = c("indirect_poisson", "kernel", "kernel_corrected", "poisson", "bernstein",
"jones", "soni", "wavelet", "wavelet_hard", "wavelet_block"),
bandwidth = c("bcv", "rlcv", "wbcv", "sqrt", "cv"),
m_range = NULL,
u = NULL,
H = NULL,
kernel = "gaussian",
j0 = NULL,
loo = NULL,
zero_at_origin = TRUE,
grid = NULL,
u_scheme = NULL,
optimizer = NULL,
rescale = TRUE,
...
)
x |
numeric sample. The series estimators ('"poisson"', '"bernstein"', '"indirect_poisson"') require strictly positive data. |
method |
one of '"indirect_poisson"' (default), '"kernel"', '"kernel_corrected"', '"poisson"', '"bernstein"', '"jones"', '"soni"', or the wavelet estimators '"wavelet"' (linear), '"wavelet_hard"', '"wavelet_block"' of [qdf_wavelet()], all with local-linear smoothing. |
bandwidth |
either a selector name ('"bcv"', the default, or '"rlcv"';
'"wbcv"' is kept only for backward compatibility: it is not scale-invariant,
is not recommended and warns, see [bcv_criterion()]; for the wavelet
methods '"cv"', the default for them, see [select_wavelet()]), the rule
'"sqrt"', or a numeric bandwidth |
m_range |
search range for |
u |
evaluation grid in |
H |
second bandwidth for 'method = "soni"' (the outer smoother on the probability scale). Defaults to the Sheather–Jones bandwidth of the uniform scores, 'bw.SJ(rank(x)/n)'. |
kernel |
kernel for the kernel-type estimators ('"gaussian"', '"triangular"', '"epanechnikov"'); see [qdf_kernel()]. |
j0 |
resolution level for the wavelet methods (default 5 when a numeric 'h' is given; chosen by cross-validation with 'bandwidth = "cv"'). |
loo, grid, u_scheme, optimizer |
passed to [select_bandwidth()]. |
zero_at_origin |
logical (default 'TRUE'), for 'method = "bernstein"'
only: anchor the fitted quantile function at |
rescale |
logical (default 'TRUE'): estimate on |
... |
currently unused. |
An object of class '"qdf"': a list with components
the sorted sample
the evaluation grid and the estimated quantile density on it
the empirical quantile function on 'u' (for convenience)
the estimator and its smoothing parameters
the output of [select_bandwidth()], or 'NULL' when a numeric bandwidth was supplied
with methods [predict.qdf()], 'print()' and [plot.qdf()].
Doosti, H., Dewan, I. and Talebian, M. (2025). Nonparametric estimation of private value distributions in first-price auctions: Evaluating quantile density function approaches. *Economics Letters*, 257, 112670. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.econlet.2025.112670")}
Parzen, E. (1979). Nonparametric statistical data modeling. *Journal of the American Statistical Association*, 74, 105–121.
set.seed(1)
x <- rgamma(80, 5, 1)
fit <- qdf(x, method = "bernstein", bandwidth = "bcv")
fit
predict(fit, u = c(0.1, 0.5, 0.9))
# compare with the truth 1 / dgamma(qgamma(u, 5), 5)
plot(fit, true = function(u) 1 / dgamma(qgamma(u, 5, 1), 5, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.