DenFMean {frechet} | R Documentation |
Fréchet means of densities.
Description
Obtain Fréchet means of densities with respect to L^2
-Wasserstein distance.
Usage
DenFMean(yin = NULL, hin = NULL, qin = NULL, optns = list())
Arguments
yin |
A matrix or list holding the sample of measurements for the observed distributions. If |
hin |
A list holding the histograms of an observed distribution. |
qin |
A matrix or list holding the quantile functions of the response. If |
optns |
A list of options control parameters specified by |
Details
Available control options are qSup
, nqSup
,
bwDen
, ndSup
, dSup
, delta
,
kernelDen
, infSupport
, and denLowerThreshold
.
See LocDenReg
for details.
- weights
A vector of weights to compute the weighted barycenter. The length of
weights
is equal to the sample size. Default is equal weights.
Value
A list containing the following components:
dout |
A numeric vector holding the density of the Fréchet mean. |
dSup |
A numeric vector giving the domain grid of |
qout |
A numeric vector holding the quantile function of the Fréchet mean. |
qSup |
A numeric vector giving the domain grid of |
optns |
A list of control options used. |
Examples
xin = seq(0,1,0.05)
yin = lapply(xin, function(x) {
rnorm(100, rnorm(1,x + x^2,0.005), 0.05)
})
res <- DenFMean(yin=yin)
plot(res)