boot.comp(y, x = NULL, N = NULL, max.comp = 2, B = 100, sig = 0.05, arbmean = TRUE, arbvar = TRUE, mix.type = c("logisregmix", "multmix", "mvnormalmix", "normalmix", "poisregmix", "regmix", "regmix.mixed", "repnormmix"), hist = TRUE, ...)
multmix
, mvnormalmix
, normalmix
, and repnormmix
and
the response values for logisregmix
, poisregmix
, and regmix
. See the documentation
concerning their respective EM algorithms for specific structure of the raw data.logisregmix
,
poisregmix
, and regmix
. A column of 1s for the intercept term must not be included! See the
documentation concerning their respective EM algorithms for specific structure of the predictor values.logisregmix
.
If NULL, then N
is an n-vector of 1s for binary logistic regression.sig
.mvnormalmix
, normalmix
, regmix
,
or repnormmix
. The default is TRUE.mvnormalmix
, normalmix
, regmix
,
or repnormmix
. The default is TRUE.y
and x
depend on
which type of mixture is selected. logisregmix
corresponds to a mixture of logistic regressions. multmix
corresponds
to a mixture of multinomials with data determined by the cut-point method. mvnormalmix
corresponds to a mixture of
multivariate normals. normalmix
corresponds to a mixture of univariate normals. poisregmix
corresponds to a mixture of
Poisson regressions. regmix
corresponds to a mixture of regressions with normal components. regmix.mixed
corresponds to a mixture of regressions with random or mixed effects. repnormmix
corresponds to a mixture
of normals with repeated measurements.boot.comp
returns a list with items:
logisregmixEM
, multmixEM
, mvnormalmixEM
, normalmixEM
,
poisregmixEM
, regmixEM
, regmixEM.mixed
, repnormmixEM
## Bootstrapping to test the number of components on the RTdata.
data(RTdata)
set.seed(100)
x <- as.matrix(RTdata[, 1:3])
y <- makemultdata(x, cuts = quantile(x, (1:9)/10))$y
a <- boot.comp(y = y, max.comp = 1, B = 5, mix.type = "multmix",
epsilon = 1e-3)
a$p.values
Run the code above in your browser using DataLab