Description Usage Arguments Details Examples
View source: R/zd_main_components.R
Extract np-1 main components and an additional first potentially exponentially distributed component from a data frame of distribution parameters with columns mean, sd, L.
1 | zd_main_components(p, np = 3, near_zero = 3)
|
p |
data frame of distribution parameters (mean, sd, L) returned by
|
np |
number of desired components |
near_zero |
heuristic upper boundary of the zone diameter interval that is considered as close to zero. Components with mean value below will be considered as resistant subpopulation. |
The algorithm is specifically intended to zone diameter (ZD) distributions where the leftmost (resistant) subpopulation is considered exponentially distributed, while the others (intermediate, wild-type) are considered approximately normal.
1 2 3 4 5 6 | set.seed(123)
x <- c(rexp(20, rate=1), rnorm(30, 10, 1), rnorm(10,15,.2), rnorm(50, 20, 2))
hist(x, breaks=20)
p <- mx_guess_components(x)
(ret <- zd_main_components(p, np=3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.