mice.impute.2l.jomo: Imputation of univariate missing data by a Bayesian...

View source: R/mice.impute.2l.jomo.R

mice.impute.2l.jomoR Documentation

Imputation of univariate missing data by a Bayesian multivariate generalized model based on conjugate priors

Description

Univariate imputation by a Bayesian multivariate generalized model based on conjugate priors. Can be used for a continuous or binary incomplete variable. For continuous variables, the modelling assumes heteroscedasticity for errors. For a binary variable, a probit link and a latent variables framework are used. The method should be used for a variable with large number of clusters and a large number of individuals per cluster.

Usage

mice.impute.2l.jomo(y, ry, x, type, nburn = 200, ...)

Arguments

y

Incomplete data vector of length n

ry

Vector of missing data pattern (FALSE=missing, TRUE=observed)

x

Matrix (n x p) of complete covariates.

type

Vector of length ncol(x) identifying random and class variables. Random variables are identified by a '2'. The class variable (only one is allowed) is coded as '-2'. Random variables also include the fixed effect.

nburn

A scalar indicating the number of iterations for the Gibbs sampler. Default is nburn=200

...

Other named arguments.

Details

Contrary to the approach developped in the R jomo package, the imputation is here sequentially performed through a FCS approach, instead of imputing all variables simulatenously. The motivation for such a method is that jomo presents some advantages over other imputation methods, but not always for any type of variables (binary or continuous). By proposing a FCS version of jomo, we allow imputation of mixed variables (continuous and binary), while taking the best of jomo and of other imputation methods. To impute one variable according to this method, other variables are assumed to be full, like in any FCS approach. The imputation function is a direct use of the R function jomo1ran from the jomo package. The argument meth is tuned to "random" to allow covariance matrices drawn from an inverse Wishart distribution. Only intercept are considered in covariates (X=NULL and Z=NULL), while the multivariate outcome corresponds to all variables of the datasets.

Value

A vector of length nmis with imputations.

Author(s)

Vincent Audigier vincent.audigier@cnam.fr from the R code of Matteo Quartagno.

References

Carpenter J.R., Kenward M.G., (2013), Multiple Imputation and its Application. Chapters 3-5-9, Wiley, ISBN: 978-0-470-74052-1.

Yucel R.M., (2011), Random-covariances and mixed-effects models for imputing multivariate multilevel continuous data, Statistical Modelling, 11 (4), 351-370, <doi:10.1177/1471082X100110040>.

See Also

mice,jomo1ran


micemd documentation built on Nov. 17, 2023, 5:07 p.m.