Approximates a target quantile function by Q_mu(u) = sum_j lambda_j Q_j(u)
over a quantile basis, estimating the weights by matching the first L sample
L-moments to the mixture's L-moments (Alvarez & Orestes 2024, eq. 2). The
problem reduces to a convex quadratic program.
Usage
qfmix(
q,
basis = "legendre",
p = 4L,
L = NULL,
constraint = c("unconstrained", "ridge", "nonneg", "simplex"),
M = 1,
weight = c("identity", "optimal"),
trim = c(0, 1),
monotone = FALSE,
n_grid = 1000L,
controls = NULL,
control = qfmix_control()
)Arguments
- q
Target: a numeric sample, a quantile function, or a
qfmixobject.- basis
A basis name (see
qfmix_basis()) or aqfmix_basisobject.- p
Sieve dimension (number of basis functions). Default
4.- L
Number of L-moments matched (
>= p). Defaultmax(p, p + 2).- constraint
Weight set:
"unconstrained","ridge","nonneg", or"simplex". (The"lasso"set and anosqpbackend are planned; this version solves the constrained programs withquadprog.)- M
Radius for
"ridge"(default1, the DSC choice).- weight
L-moment weighting matrix:
"identity"or"optimal"(two-step).- trim
Trimming window
c(a, b)for the L-moment integrals.- monotone
If
TRUE, add grid constraints forcingQ_munondecreasing.- n_grid
Integration grid resolution.
- controls
For the empirical basis: control observations (see
qfmix_basis()).- control
A
qfmix_control()list.