Global Fréchet regression for densities with respect to
GloDenReg(
xin = NULL,
yin = NULL,
hin = NULL,
qin = NULL,
xout = NULL,
optns = list()
)
A list containing the following components:
Input xout
.
A matrix or list holding the output densities corresponding to xout
. If dout
is a matrix, each row gives a density and the domain grid is given in dSup
. If dout
is a list, each element is a list of two components, x
and y
, giving the domain grid and density function values, respectively.
A numeric vector giving the domain grid of dout
when it is a matrix.
A matrix holding the quantile functions of the output densities. Each row corresponds to a value in xout
.
A numeric vector giving the domain grid of qout
.
Input xin
.
Densities corresponding to the input yin
, hin
or qin
.
Quantile functions corresponding to the input yin
, hin
or qin
.
A scalar giving the R squared value if optns$Rsquared = TRUE
.
A list of control options used.
An n by p matrix or a vector of length n (if p=1) with input measurements of the predictors.
A matrix or list holding the sample of observations of the response. If yin
is a matrix, each row holds the observations of the response corresponding to a row in xin
.
A list holding the histograms of the response corresponding to each row in xin
.
A matrix or list holding the quantile functions of the response. If qin
is a matrix, each row holds the quantile function of the response taking values on optns$qSup
corresponding to a row in xin
.
Note that only one of the three yin
, hin
, and qin
needs to be input.
If more than one of them are specified, yin
overwrites hin
, and hin
overwrites qin
.
A k by p matrix or a vector of length k (if p=1) with output measurements of the predictors. Default is xin
.
A list of control parameters specified by list(name=value)
.
Available control options are qSup
, nqSup
,
lower
, upper
, Rsquared
, bwDen
, ndSup
, dSup
,
delta
, kernelDen
, infSupport
, and denLowerThreshold
.
Rsquared
is explained as follows and see LocDenReg
for the other options.
A logical variable indicating whether R squared would be returned. Default is FALSE
.
Petersen, A., & Müller, H.-G. (2019). "Fréchet regression for random objects with Euclidean predictors." The Annals of Statistics, 47(2), 691--719.
xin = seq(0,1,0.05)
yin = lapply(xin, function(x) {
rnorm(100, rnorm(1,x,0.005), 0.05)
})
qSup = seq(0,1,0.02)
xout = seq(0,1,0.25)
res1 <- GloDenReg(xin=xin, yin=yin, xout=xout, optns = list(qSup = qSup))
plot(res1)
# \donttest{
hin = lapply(yin, function(y) hist(y, breaks = 50, plot=FALSE))
res2 <- GloDenReg(xin=xin, hin=hin, xout=xout, optns = list(qSup = qSup))
plot(res2)
# }
Run the code above in your browser using DataLab