Maximum penalized likelihood density estimation
density_mpl.RdFits a density of the form \(p(x) = \exp(\phi(x)^\top c)/C\) on a
bounded interval, with optional smoothness penalty.
Dispatches between the Rust backend (default, ~10–60x faster) and the
original R algorithm (preserved as density_mpl_legacy()).
Usage
density_mpl(
x,
WfdParobj,
conv = 1e-04,
iterlim = 20,
backend = c("rust", "legacy"),
...
)Arguments
- x
Observation vector or two-column (value, frequency) matrix.
- WfdParobj
An
fdParobject (orfd/basisfd).- conv
Convergence tolerance on the objective. Default
1e-4.- iterlim
Maximum Fisher-scoring iterations. Default
20.- backend
Which implementation to use.
"rust"(default) calls the compiled kernel viadensity_mpl_rust();"legacy"calls the original R codedensity_mpl_legacy()for bit-for-bit compatibility.- ...
Further arguments forwarded to the selected backend.