gcap.extractComponents | R Documentation |
Decompose distribution into components
gcap.extractComponents( dat, dist = "norm", seed = 2021L, model_selection = "BIC", threshold = 0.4, min_prior = 0.001, niter = 1000, nrep = 5, min_comp = 1, max_comp = 10 )
dat |
a distribution represented as a numeric vector to decompose. |
dist |
'pois' or 'norm' (default). |
seed |
seed number. |
model_selection |
model selection strategy, default is 'BIC'. Details about custom setting please refer to flexmix package. |
threshold |
default is |
min_prior |
the minimum relative size of components, default is 0.001. Details about custom setting please refer to flexmix package. |
niter |
the maximum number of iterations. |
nrep |
number of run times for each value of component, keep only the solution with maximum likelihood. |
min_comp |
minimal number of components to fit, default is 1. |
max_comp |
maximal number of components to fit, default is 10. |
set.seed(2021) x = c(rnorm(10, 0), rnorm(50, 1), rnorm(20, 4), rnorm(5, 10)) y = gcap.extractComponents(x, max_comp = 5) y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.