| det.construct {detpack} | R Documentation |
Distribution Element Tree (DET) Construction
Description
The function det.construct generates a distribution element tree DET from available data. The DET can be used firstly in connection with det.query for density estimation. Secondly, with det.rnd, DETs can be used for smooth bootstrapping or more specifically conditional or unconditional random number generation.
Usage
det.construct(dta, mode = 2, lb = NA, ub = NA, alphag = 0.001,
alphad = 0.001, progress = TRUE, dtalim = Inf, cores = 1)
Arguments
dta |
matrix with |
mode |
order of distribution elements applied, default is |
lb, ub |
vectors of length |
alphag, alphad |
significance levels for goodness-of-fit and independence tests, respectively, in element refinement or splitting process. Default is |
progress |
optional logical, if set to |
dtalim |
for large datasets, |
cores |
|
Value
A DET object, which reflects the tree and pre-white transform, is returned.
References
Meyer, D.W. (2016) http://arxiv.org/abs/1610.00345 or Meyer, D.W., Statistics and Computing (2017) https://doi.org/10.1007/s11222-017-9751-9 and Meyer, D.W. (2017) http://arxiv.org/abs/1711.04632
Examples
## Gaussian mixture data
require(stats)
det <- det.construct(t(c(rnorm(1e5),rnorm(1e4)/100+2))) # default linear det (mode = 2)
x <- t(seq(-4,6,0.01)); p <- det.query(det, x); plot(x, p, type = "l")
## piecewise uniform data with peaks
x <- matrix(c(rep(0,1e3),rep(1,1e3), 2*runif(1e4),
rep(0,5e2),rep(1,25e2),2*runif(9e3)), nrow = 2, byrow = TRUE)
det <- det.construct(x, mode = 1, lb = 0, ub = 0) # constant elements, no pre-whitening