demix
returns (invisibly) the data frame containing observations $\bm{x}_{1}, \ldots, \bm{x}_{n}$ and empirical
densities $f_{1}, \ldots, f_{n}$ for the Parzen window or k-nearest neighbour or bin means $\bar{\bm{x}}_{1}, \ldots, \bar{\bm{x}}_{v}$
and empirical densities $f_{1}, \ldots, f_{v}$ for the histogram preprocessing. Vectors $\bm{x}$ and $\bar{\bm{x}}$ are subvectors of
$\bm{y} = (y_{1}, \ldots, y_{d})^{\top}$ and $\bar{\bm{y}} = (\bar{y}_{1}, \ldots, \bar{y}_{d})^{\top}$.demix(x = NULL, Preprocessing = NULL, pdf = NULL,
k = NULL, xmin = NULL, xmax = NULL, ...)
"histogram"
, "Parzen window"
or "k-nearest neighbour"
."normal"
, "lognormal"
, "Weibull"
, "gamma"
, "binomial"
, "Poisson"
or "Dir
NULL
.NULL
.# Generate simulated dataset.
Theta <- list(pdf1 = rep("normal", 2),
theta1.1 = c(10, 20),
theta2.1 = c(3, 2),
pdf2 = rep("normal", 2),
theta1.2 = c(3, 2),
theta2.2 = c(20, 10))
simulated <- RNGMIX(Dataset.name = "simulated",
rseed = -1,
n = c(15, 15),
Theta = Theta)
# Preprocess simulated dataset.
y1y2f <- demix(x = simulated@Dataset[[1]],
Preprocessing = "histogram",
pdf = c("normal", "normal"),
k = 6)
y1y2f
Run the code above in your browser using DataLab