| mice.impute.2l.zinb | R Documentation |
The functions impute zero-inflated multilevel count data based on a two-level Poisson or negative binomial zero-inflation model, either using a Bayesian regression or a bootstrap regression approach (appendix: “.boot”). The .noint variants treat the intercept only as a fixed, but not as a random effect. It may be specified, if the intercept is excluded from the random part of the zero model (“.noint.zero”), the count model (“.noint.count”), or both models (“.noint.both”). Zero-inflation models are mixture models and consist of two model components: the zero model (a binomial generalized linear mixed effects model), determining, if the observational unit belongs to zero-inflation process (certain zeros) or to the count process, and the count model (a two-level Poisson or NB model), determining, what count (zero or non-zero) the observational unit has.
mice.impute.2l.zinb(y, ry, x, type, intercept.c = TRUE, intercept.z = TRUE,
wy = NULL, EV = TRUE)
mice.impute.2l.zinb.boot(y, ry, x, type, intercept.c = TRUE,
intercept.z = TRUE, wy = NULL, EV = TRUE)
mice.impute.2l.zinb.noint.both.boot(y, ry, x, type, intercept.c = FALSE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
mice.impute.2l.zinb.noint.both(y, ry, x, type, intercept.c = FALSE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
mice.impute.2l.zinb.noint.count.boot(y, ry, x, type, intercept.c = FALSE,
intercept.z = TRUE, wy = NULL, EV = TRUE)
mice.impute.2l.zinb.noint.count(y, ry, x, type, intercept.c = FALSE,
intercept.z = TRUE, wy = NULL, EV = TRUE)
mice.impute.2l.zinb.noint.zero.boot(y, ry, x, type, intercept.c = TRUE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
mice.impute.2l.zinb.noint.zero(y, ry, x, type, intercept.c = TRUE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
mice.impute.2l.zip(y, ry, x, type, intercept.c = TRUE, intercept.z = TRUE,
wy = NULL, EV = TRUE)
mice.impute.2l.zip.boot(y, ry, x, type, intercept.c = TRUE,
intercept.z = TRUE, wy = NULL, EV = TRUE)
mice.impute.2l.zip.noint.both.boot(y, ry, x, type, intercept.c = FALSE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
mice.impute.2l.zip.noint.both(y, ry, x, type, intercept.c = FALSE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
mice.impute.2l.zip.noint.count.boot(y, ry, x, type, intercept.c = FALSE,
intercept.z = TRUE, wy = NULL, EV = TRUE)
mice.impute.2l.zip.noint.count(y, ry, x, type, intercept.c = FALSE,
intercept.z = TRUE, wy = NULL, EV = TRUE)
mice.impute.2l.zip.noint.zero.boot(y, ry, x, type, intercept.c = TRUE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
mice.impute.2l.zip.noint.zero(y, ry, x, type, intercept.c = TRUE,
intercept.z = FALSE, wy = NULL, EV = TRUE)
y |
Numeric vector with incomplete data in long format (i.e. the groups are stacked upon each other) |
ry |
Response pattern of |
x |
matrix with |
type |
vector of length |
intercept.c |
|
intercept.z |
|
wy |
Logical vector of length |
EV |
should automatic outlier handling of imputed values be enabled? Default is |
Model specification details:
-2 = class variable (only one class variable is allowed!)
0 = variable not included in imputation model
1 = variable will be included as a fixed effect (zero and count model)
2 = variable will be included as a fixed and random effect (zero and count model)
3 = variable will be included as a fixed effect (count model only)
4 = variable will be included as a fixed and random effect (count model only)
5 = variable will be included as a fixed effect (zero model only)
6 = variable will be included as a fixed and random effect (zero model only)
The Bayesian regression variants (see Rubin 1987, p. 169-170) consist of the following steps:
Fit the zero model (a two-level binomial generalized linear mixed effects model), using the glmmTMB function from package glmmTMB; find bhat, the posterior mean, and V(bhat), the posterior variance of model parameters b
Draw b* from N(bhat,V(bhat))
Compute predicted probabilities for having a zero vs. non-zero count
Draw imputations (zeros and ones) from a binomial distribution with the respective individual probabilities obtained from step 3.
Fit the count model (a two-level Poisson or NB model) using the glmmTMB function from package glmmTMB; find bhat, the posterior mean, and V(bhat), the posterior variance of model parameters b.
Draw b* from N(bhat,V(bhat))
Compute predicted values using parameters b* and replace non-zero imputations (from step 4) by a draw from a zero-truncated NB distribution with mean parameter mu being the count predicted for the respective incomplete case.
The bootstrap functions draw a bootstrap sample from y[ry] and x[ry,] (Note: we resample clusters rather than individual cases) and consist of the following steps:
Fit the zero model to the bootstrap sample
Compute predicted probabilities for having a zero vs. non-zero count
Draw imputations from a binomial distribution.
Fit the count model to the boostrap sample
Compute predicted counts and draw non-zero imputations (from step 3) from a zero-truncated Poisson or NB distribution.
Numeric vector of length sum(!ry) with imputations
mice.impute.2l.zinb: Bayesian regression variant; random intercepts
mice.impute.2l.zinb.boot: bootstrap regression variant; random intercepts
mice.impute.2l.zinb.noint.both.boot: bootstrap regression variant; fixed intercepts
mice.impute.2l.zinb.noint.both: Bayesian regression variant; fixed intercepts
mice.impute.2l.zinb.noint.count.boot: bootstrap regression variant; fixed intercept in count model
mice.impute.2l.zinb.noint.count: Bayesian regression variant; fixed intercept in count model
mice.impute.2l.zinb.noint.zero.boot: bootstrap regression variant; fixed interceot in zero model
mice.impute.2l.zinb.noint.zero: Bayesian regression variant; fixed intercept in zero model
mice.impute.2l.zip: Bayesian regression variant; random intercepts
mice.impute.2l.zip.boot: bootstrap regression variant; random intercepts
mice.impute.2l.zip.noint.both.boot: bootstrap regression variant; fixed intercepts
mice.impute.2l.zip.noint.both: Bayesian regression variant; fixed intercepts
mice.impute.2l.zip.noint.count.boot: bootstrap regression variant; fixed intercept in count model
mice.impute.2l.zip.noint.count: Bayesian regression variant; fixed intercept in count model
mice.impute.2l.zip.noint.zero.boot: bootstrap regression variant; fixed interceot in zero model
mice.impute.2l.zip.noint.zero: Bayesian regression variant; fixed intercept in zero model
Kristian Kleinke
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.