| unmix | R Documentation |
Estimates the proportions of specified source datasets in each sink dataset by fitting a weighted combination of the sources' empirical cumulative distribution functions.
unmix(
x,
nsources = 2,
source_names = names(x)[1:nsources],
plot = TRUE,
boot = (length(x) - length(source_names) == 1),
nboot = 500,
hide = NULL,
sigdig = 2,
...
)
x |
a named list of numeric vectors containing the source and sink datasets. |
nsources |
the number of source datasets at the start of
|
source_names |
names of the source datasets. Datasets in
|
plot |
logical flag indicating whether to plot the empirical cumulative distributions, fitted distributions, and estimated proportions. |
boot |
logical flag indicating whether to bootstrap the source datasets to estimate confidence limits for the proportions. |
nboot |
number of bootstrap replicates. |
hide |
vector with indices of samples that should be removed from the plot. |
sigdig |
the number of significant digits for the results plot. |
... |
additional graphical parameters passed to the plots. |
The input is a named list of numeric vectors. The first
nsources vectors are treated as sources by default; all
remaining vectors are treated as sinks. The source proportions are
constrained to be between zero and one and to sum to one. With
boot=TRUE, the source observations are resampled to estimate
confidence limits for the proportions.
If boot=FALSE, a matrix with one row per sink and
columns for the estimated source proportions and the Cramer-von
Mises fit statistic. If boot=TRUE, a list containing
this matrix (prop) and matrices of lower (ll) and
upper (ul) bootstrap confidence limits for the source
proportions.
attach(examples)
fit <- unmix(DZ, sources=c('N1','N4','N14'), plot=FALSE)
print(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.