diff --git a/404.html b/404.html
index 9242934b9..919128395 100644
--- a/404.html
+++ b/404.html
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html
index 808e125ea..86c88b83d 100644
--- a/CODE_OF_CONDUCT.html
+++ b/CODE_OF_CONDUCT.html
@@ -1,5 +1,5 @@
-
Contributor Covenant Code of Conduct • mice
+Contributor Covenant Code of Conduct • mice
Skip to contents
diff --git a/LICENSE.html b/LICENSE.html
index 6a90d52af..d1a77e3be 100644
--- a/LICENSE.html
+++ b/LICENSE.html
@@ -1,5 +1,5 @@
-GNU General Public License • mice
+GNU General Public License • mice
Skip to contents
diff --git a/articles/index.html b/articles/index.html
index 249c473dd..ab4810ec7 100644
--- a/articles/index.html
+++ b/articles/index.html
@@ -1,5 +1,5 @@
-Articles • mice
+Articles • mice
Skip to contents
diff --git a/articles/oldfriends.html b/articles/oldfriends.html
index 99e58bc7d..9af42c72b 100644
--- a/articles/oldfriends.html
+++ b/articles/oldfriends.html
@@ -14,8 +14,8 @@
-
-
+
+
@@ -64,7 +64,7 @@
diff --git a/reference/make.method.html b/reference/make.method.html
index 12cf81451..28f8bcbf6 100644
--- a/reference/make.method.html
+++ b/reference/make.method.html
@@ -1,5 +1,5 @@
-Creates a method argument — make.method • mice Creates a method argument — make.method • mice Creates a post argument — make.post • mice Creates a post argument — make.post • mice Creates a predictorMatrix argument — make.predictorMatrix • mice Creates a predictorMatrix argument — make.predictorMatrix • mice Creates a visitSequence argument — make.visitSequence • mice Creates a visitSequence argument — make.visitSequence • mice Creates a where argument — make.where • mice Creates a where argument — make.where • mice Mammal sleep data — mammalsleep • mice Mammal sleep data — mammalsleep • mice Find index of matched donor units — matchindex • mice
+Find index of matched donor units — matchindex • mice
Skip to contents
diff --git a/reference/md.pairs.html b/reference/md.pairs.html
index 316a8491c..a1d234bab 100644
--- a/reference/md.pairs.html
+++ b/reference/md.pairs.html
@@ -1,5 +1,5 @@
-Missing data pattern by variable pairs — md.pairs • mice
+Missing data pattern by variable pairs — md.pairs • mice
Skip to contents
diff --git a/reference/md.pattern.html b/reference/md.pattern.html
index 46c75ebd9..1bfae4c34 100644
--- a/reference/md.pattern.html
+++ b/reference/md.pattern.html
@@ -1,5 +1,5 @@
-Missing data pattern — md.pattern • mice
+Missing data pattern — md.pattern • mice
Skip to contents
diff --git a/reference/mdc.html b/reference/mdc.html
index a0dd6a211..68489c024 100644
--- a/reference/mdc.html
+++ b/reference/mdc.html
@@ -1,5 +1,5 @@
-Graphical parameter for missing data plots — mdc • mice Graphical parameter for missing data plots — mdc • mice mice: Multivariate Imputation by Chained Equations — mice • mice mice: Multivariate Imputation by Chained Equations — mice • mice Imputation by a two-level logistic model using glmer — mice.impute.2l.bin • mice Imputation by a two-level logistic model using glmer — mice.impute.2l.bin • mice
Skip to contents
diff --git a/reference/mice.impute.2l.lmer.html b/reference/mice.impute.2l.lmer.html
index f8aecc658..52bda6036 100644
--- a/reference/mice.impute.2l.lmer.html
+++ b/reference/mice.impute.2l.lmer.html
@@ -1,5 +1,5 @@
-Imputation by a two-level normal model using lmer — mice.impute.2l.lmer • mice Imputation by a two-level normal model using lmer — mice.impute.2l.lmer • mice
Skip to contents
diff --git a/reference/mice.impute.2l.norm.html b/reference/mice.impute.2l.norm.html
index 04c4fb35c..c3b2f09c6 100644
--- a/reference/mice.impute.2l.norm.html
+++ b/reference/mice.impute.2l.norm.html
@@ -1,5 +1,5 @@
-Imputation by a two-level normal model — mice.impute.2l.norm • mice
+Imputation by a two-level normal model — mice.impute.2l.norm • mice
Skip to contents
diff --git a/reference/mice.impute.2l.pan.html b/reference/mice.impute.2l.pan.html
index 109a14dfe..f5dac711e 100644
--- a/reference/mice.impute.2l.pan.html
+++ b/reference/mice.impute.2l.pan.html
@@ -1,5 +1,5 @@
-Imputation by a two-level normal model using pan — mice.impute.2l.pan • mice Imputation by a two-level normal model using pan — mice.impute.2l.pan • mice Imputation of most likely value within the class — mice.impute.2lonly.mean • mice Imputation of most likely value within the class — mice.impute.2lonly.mean • mice Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm • mice Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm • mice Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm • mice Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm • mice Imputation by classification and regression trees — mice.impute.cart • mice
+Imputation by classification and regression trees — mice.impute.cart • mice
Skip to contents
diff --git a/reference/mice.impute.jomoImpute.html b/reference/mice.impute.jomoImpute.html
index a9e91dbfb..ab6f66526 100644
--- a/reference/mice.impute.jomoImpute.html
+++ b/reference/mice.impute.jomoImpute.html
@@ -1,5 +1,5 @@
-Multivariate multilevel imputation using jomo — mice.impute.jomoImpute • mice Multivariate multilevel imputation using jomo — mice.impute.jomoImpute • mice Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg • mice
+Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg • mice
Skip to contents
diff --git a/reference/mice.impute.lasso.norm.html b/reference/mice.impute.lasso.norm.html
index 0ceaa9bc7..73c790901 100644
--- a/reference/mice.impute.lasso.norm.html
+++ b/reference/mice.impute.lasso.norm.html
@@ -1,5 +1,5 @@
-Imputation by direct use of lasso linear regression — mice.impute.lasso.norm • mice
+Imputation by direct use of lasso linear regression — mice.impute.lasso.norm • mice
Skip to contents
diff --git a/reference/mice.impute.lasso.select.logreg.html b/reference/mice.impute.lasso.select.logreg.html
index b80ab6660..3d04fd5d6 100644
--- a/reference/mice.impute.lasso.select.logreg.html
+++ b/reference/mice.impute.lasso.select.logreg.html
@@ -1,5 +1,5 @@
-Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg • mice Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg • mice
Skip to contents
diff --git a/reference/mice.impute.lasso.select.norm.html b/reference/mice.impute.lasso.select.norm.html
index 1e69e38d9..430fb187a 100644
--- a/reference/mice.impute.lasso.select.norm.html
+++ b/reference/mice.impute.lasso.select.norm.html
@@ -1,5 +1,5 @@
-Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm • mice Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm • mice
Skip to contents
diff --git a/reference/mice.impute.lda.html b/reference/mice.impute.lda.html
index 745f34008..4a8cd26f4 100644
--- a/reference/mice.impute.lda.html
+++ b/reference/mice.impute.lda.html
@@ -1,5 +1,5 @@
-Imputation by linear discriminant analysis — mice.impute.lda • mice
+Imputation by linear discriminant analysis — mice.impute.lda • mice
Skip to contents
diff --git a/reference/mice.impute.logreg.boot.html b/reference/mice.impute.logreg.boot.html
index 52084e985..d7e7c3329 100644
--- a/reference/mice.impute.logreg.boot.html
+++ b/reference/mice.impute.logreg.boot.html
@@ -1,5 +1,5 @@
-Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot • mice Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot • mice Imputation by logistic regression — mice.impute.logreg • mice
+Imputation by logistic regression — mice.impute.logreg • mice
Skip to contents
diff --git a/reference/mice.impute.mean.html b/reference/mice.impute.mean.html
index f16c8a199..66ded3879 100644
--- a/reference/mice.impute.mean.html
+++ b/reference/mice.impute.mean.html
@@ -1,5 +1,5 @@
-Imputation by the mean — mice.impute.mean • mice
+Imputation by the mean — mice.impute.mean • mice
Skip to contents
diff --git a/reference/mice.impute.midastouch.html b/reference/mice.impute.midastouch.html
index 983b2cd64..2a2e1bee0 100644
--- a/reference/mice.impute.midastouch.html
+++ b/reference/mice.impute.midastouch.html
@@ -1,5 +1,5 @@
-Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch • mice
+Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch • mice
Skip to contents
diff --git a/reference/mice.impute.mnar.html b/reference/mice.impute.mnar.html
index 6a97654cb..ee8c62e96 100644
--- a/reference/mice.impute.mnar.html
+++ b/reference/mice.impute.mnar.html
@@ -1,5 +1,5 @@
-Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg • mice Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg • mice Imputation by multivariate predictive mean matching — mice.impute.mpmm • mice Imputation by multivariate predictive mean matching — mice.impute.mpmm • mice
Skip to contents
diff --git a/reference/mice.impute.norm.boot.html b/reference/mice.impute.norm.boot.html
index a4da12d18..c6a55d2b6 100644
--- a/reference/mice.impute.norm.boot.html
+++ b/reference/mice.impute.norm.boot.html
@@ -1,5 +1,5 @@
-Imputation by linear regression, bootstrap method — mice.impute.norm.boot • mice
+Imputation by linear regression, bootstrap method — mice.impute.norm.boot • mice
Skip to contents
diff --git a/reference/mice.impute.norm.html b/reference/mice.impute.norm.html
index 4c069249a..9ab4362c8 100644
--- a/reference/mice.impute.norm.html
+++ b/reference/mice.impute.norm.html
@@ -1,5 +1,5 @@
-Imputation by Bayesian linear regression — mice.impute.norm • mice Imputation by Bayesian linear regression — mice.impute.norm • mice
Skip to contents
diff --git a/reference/mice.impute.norm.nob.html b/reference/mice.impute.norm.nob.html
index b55a5fcc1..fb7a7b410 100644
--- a/reference/mice.impute.norm.nob.html
+++ b/reference/mice.impute.norm.nob.html
@@ -1,5 +1,5 @@
-Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob • mice Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob • mice
Skip to contents
diff --git a/reference/mice.impute.norm.predict.html b/reference/mice.impute.norm.predict.html
index 85f569dca..045728a66 100644
--- a/reference/mice.impute.norm.predict.html
+++ b/reference/mice.impute.norm.predict.html
@@ -1,5 +1,5 @@
-Imputation by linear regression through prediction — mice.impute.norm.predict • mice
Skip to contents
diff --git a/reference/mice.impute.panImpute.html b/reference/mice.impute.panImpute.html
index 88e410e33..da480f82f 100644
--- a/reference/mice.impute.panImpute.html
+++ b/reference/mice.impute.panImpute.html
@@ -1,5 +1,5 @@
-Impute multilevel missing data using pan — mice.impute.panImpute • mice Impute multilevel missing data using pan — mice.impute.panImpute • mice Passive imputation — mice.impute.passive • mice
+Passive imputation — mice.impute.passive • mice
Skip to contents
diff --git a/reference/mice.impute.pmm.html b/reference/mice.impute.pmm.html
index 67ced21c1..1ba958b26 100644
--- a/reference/mice.impute.pmm.html
+++ b/reference/mice.impute.pmm.html
@@ -1,5 +1,5 @@
-Imputation by predictive mean matching — mice.impute.pmm • mice
+Imputation by predictive mean matching — mice.impute.pmm • mice
Skip to contents
diff --git a/reference/mice.impute.polr.html b/reference/mice.impute.polr.html
index ca32f16ae..18d923597 100644
--- a/reference/mice.impute.polr.html
+++ b/reference/mice.impute.polr.html
@@ -1,5 +1,5 @@
-Imputation of ordered data by polytomous regression — mice.impute.polr • mice
+Imputation of ordered data by polytomous regression — mice.impute.polr • mice
Skip to contents
diff --git a/reference/mice.impute.polyreg.html b/reference/mice.impute.polyreg.html
index 37400dd99..24569d54a 100644
--- a/reference/mice.impute.polyreg.html
+++ b/reference/mice.impute.polyreg.html
@@ -1,5 +1,5 @@
-Imputation of unordered data by polytomous regression — mice.impute.polyreg • mice
+Imputation of unordered data by polytomous regression — mice.impute.polyreg • mice
Skip to contents
diff --git a/reference/mice.impute.quadratic.html b/reference/mice.impute.quadratic.html
index 930b45a9f..e91d9ed62 100644
--- a/reference/mice.impute.quadratic.html
+++ b/reference/mice.impute.quadratic.html
@@ -1,5 +1,5 @@
-Imputation of quadratic terms — mice.impute.quadratic • mice Imputation of quadratic terms — mice.impute.quadratic • mice
Skip to contents
diff --git a/reference/mice.impute.rf.html b/reference/mice.impute.rf.html
index 181ef7f7d..9df549fdf 100644
--- a/reference/mice.impute.rf.html
+++ b/reference/mice.impute.rf.html
@@ -1,5 +1,5 @@
-Imputation by random forests — mice.impute.rf • mice
+Imputation by random forests — mice.impute.rf • mice
Skip to contents
diff --git a/reference/mice.impute.ri.html b/reference/mice.impute.ri.html
index 656f1c4d3..2159e0c53 100644
--- a/reference/mice.impute.ri.html
+++ b/reference/mice.impute.ri.html
@@ -1,5 +1,5 @@
-Imputation by the random indicator method for nonignorable data — mice.impute.ri • mice
+Imputation by the random indicator method for nonignorable data — mice.impute.ri • mice
Skip to contents
diff --git a/reference/mice.impute.sample.html b/reference/mice.impute.sample.html
index ebe1468ee..a0c1dabc5 100644
--- a/reference/mice.impute.sample.html
+++ b/reference/mice.impute.sample.html
@@ -1,5 +1,5 @@
-Imputation by simple random sampling — mice.impute.sample • mice
+Imputation by simple random sampling — mice.impute.sample • mice
Skip to contents
diff --git a/reference/mice.mids.html b/reference/mice.mids.html
index 025f7d461..cd1c13805 100644
--- a/reference/mice.mids.html
+++ b/reference/mice.mids.html
@@ -1,5 +1,5 @@
-Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids • mice
+Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids • mice
Skip to contents
diff --git a/reference/mice.theme.html b/reference/mice.theme.html
index 70a4f30a9..e55ba7fac 100644
--- a/reference/mice.theme.html
+++ b/reference/mice.theme.html
@@ -1,5 +1,5 @@
-Set the theme for the plotting Trellis functions — mice.theme • mice Set the theme for the plotting Trellis functions — mice.theme • mice
Skip to contents
diff --git a/reference/mids-class.html b/reference/mids-class.html
index 5be1b2b50..5e3b48370 100644
--- a/reference/mids-class.html
+++ b/reference/mids-class.html
@@ -1,5 +1,5 @@
-Multiply imputed data set (mids) — mids-class • mice Multiply imputed data set (mids) — mids-class • mice Export mids object to Mplus — mids2mplus • mice Export mids object to Mplus — mids2mplus • mice
Skip to contents
diff --git a/reference/mids2spss.html b/reference/mids2spss.html
index 81dd399c0..d3c915e58 100644
--- a/reference/mids2spss.html
+++ b/reference/mids2spss.html
@@ -1,5 +1,5 @@
-Export mids object to SPSS — mids2spss • mice Export mids object to SPSS — mids2spss • mice
Skip to contents
diff --git a/reference/mipo.html b/reference/mipo.html
index 6b0f86bac..b72139a2c 100644
--- a/reference/mipo.html
+++ b/reference/mipo.html
@@ -1,5 +1,5 @@
-mipo: Multiple imputation pooled object — mipo • mice mipo: Multiple imputation pooled object — mipo • mice
Skip to contents
diff --git a/reference/mira-class.html b/reference/mira-class.html
index 082d35531..b064214a2 100644
--- a/reference/mira-class.html
+++ b/reference/mira-class.html
@@ -1,5 +1,5 @@
-Multiply imputed repeated analyses (mira) — mira-class • mice Multiply imputed repeated analyses (mira) — mira-class • mice MNAR demo data — mnar_demo_data • mice
+MNAR demo data — mnar_demo_data • mice
Skip to contents
diff --git a/reference/name.blocks.html b/reference/name.blocks.html
index 6d1de8186..b7b9c63d5 100644
--- a/reference/name.blocks.html
+++ b/reference/name.blocks.html
@@ -1,5 +1,5 @@
-Name imputation blocks — name.blocks • mice Name imputation blocks — name.blocks • mice
Skip to contents
diff --git a/reference/name.formulas.html b/reference/name.formulas.html
index 425121e4d..62ae516bb 100644
--- a/reference/name.formulas.html
+++ b/reference/name.formulas.html
@@ -1,5 +1,5 @@
-Name formula list elements — name.formulas • mice Name formula list elements — name.formulas • mice
Skip to contents
diff --git a/reference/ncc.html b/reference/ncc.html
index f1ff78380..98e2fb961 100644
--- a/reference/ncc.html
+++ b/reference/ncc.html
@@ -1,5 +1,5 @@
-Number of complete cases — ncc • mice
+Number of complete cases — ncc • mice
Skip to contents
diff --git a/reference/nelsonaalen.html b/reference/nelsonaalen.html
index ed1bb5474..97d5929ee 100644
--- a/reference/nelsonaalen.html
+++ b/reference/nelsonaalen.html
@@ -1,5 +1,5 @@
-Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen • mice
+Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen • mice
Skip to contents
diff --git a/reference/nhanes.html b/reference/nhanes.html
index 9a7f7a145..47467938b 100644
--- a/reference/nhanes.html
+++ b/reference/nhanes.html
@@ -1,5 +1,5 @@
-NHANES example - all variables numerical — nhanes • mice
+NHANES example - all variables numerical — nhanes • mice
Skip to contents
diff --git a/reference/nhanes2.html b/reference/nhanes2.html
index 218279b98..bb2d63bf7 100644
--- a/reference/nhanes2.html
+++ b/reference/nhanes2.html
@@ -1,5 +1,5 @@
-NHANES example - mixed numerical and discrete variables — nhanes2 • mice
+NHANES example - mixed numerical and discrete variables — nhanes2 • mice
Skip to contents
diff --git a/reference/nic.html b/reference/nic.html
index 39cb08727..845cb7f43 100644
--- a/reference/nic.html
+++ b/reference/nic.html
@@ -1,5 +1,5 @@
-Number of incomplete cases — nic • mice
+Number of incomplete cases — nic • mice
Skip to contents
diff --git a/reference/nimp.html b/reference/nimp.html
index f63ddf3a3..f87fc8dd1 100644
--- a/reference/nimp.html
+++ b/reference/nimp.html
@@ -1,5 +1,5 @@
-Number of imputations per block — nimp • mice Number of imputations per block — nimp • mice
Skip to contents
diff --git a/reference/norm.draw.html b/reference/norm.draw.html
index 591a00acb..b36caf3e0 100644
--- a/reference/norm.draw.html
+++ b/reference/norm.draw.html
@@ -1,5 +1,5 @@
-Draws values of beta and sigma by Bayesian linear regression — norm.draw • mice Draws values of beta and sigma by Bayesian linear regression — norm.draw • mice Wrapper function that runs MICE in parallel — parlmice • mice Wrapper function that runs MICE in parallel — parlmice • mice
Skip to contents
diff --git a/reference/pattern.html b/reference/pattern.html
index f6b624f7a..42da238ee 100644
--- a/reference/pattern.html
+++ b/reference/pattern.html
@@ -1,5 +1,5 @@
-Datasets with various missing data patterns — pattern • mice
+Datasets with various missing data patterns — pattern • mice
Skip to contents
diff --git a/reference/plot.mids.html b/reference/plot.mids.html
index 965a10c62..0352b0c47 100644
--- a/reference/plot.mids.html
+++ b/reference/plot.mids.html
@@ -1,5 +1,5 @@
-Plot the trace lines of the MICE algorithm — plot.mids • mice Plot the trace lines of the MICE algorithm — plot.mids • mice Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match • mice Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match • mice Compare two nested models fitted to imputed data — pool.compare • mice Compare two nested models fitted to imputed data — pool.compare • mice
Skip to contents
diff --git a/reference/pool.html b/reference/pool.html
index 63d78cbac..9f9312be1 100644
--- a/reference/pool.html
+++ b/reference/pool.html
@@ -1,5 +1,5 @@
-Combine estimates by pooling rules — pool • mice Combine estimates by pooling rules — pool • mice Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared • mice Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared • mice Multiple imputation pooling: univariate version — pool.scalar • mice
+Multiple imputation pooling: univariate version — pool.scalar • mice
Skip to contents
diff --git a/reference/pool.table.html b/reference/pool.table.html
index 4d3dc6fbc..c75eda0e3 100644
--- a/reference/pool.table.html
+++ b/reference/pool.table.html
@@ -1,5 +1,5 @@
-Combines estimates from a tidy table — pool.table • mice
+Combines estimates from a tidy table — pool.table • mice
Skip to contents
diff --git a/reference/popmis.html b/reference/popmis.html
index d42ebbc1d..eb8213039 100644
--- a/reference/popmis.html
+++ b/reference/popmis.html
@@ -1,5 +1,5 @@
-Hox pupil popularity data with missing popularity scores — popmis • mice
+Hox pupil popularity data with missing popularity scores — popmis • mice
Skip to contents
diff --git a/reference/pops.html b/reference/pops.html
index 210405a73..ae54fb6fb 100644
--- a/reference/pops.html
+++ b/reference/pops.html
@@ -1,5 +1,5 @@
-Project on preterm and small for gestational age infants (POPS) — pops • mice Project on preterm and small for gestational age infants (POPS) — pops • mice Potthoff-Roy data — potthoffroy • mice
+Potthoff-Roy data — potthoffroy • mice
Skip to contents
diff --git a/reference/print.html b/reference/print.html
index 41eef4cd4..07e5aa048 100644
--- a/reference/print.html
+++ b/reference/print.html
@@ -1,5 +1,5 @@
-Print a mids object — print.mids • mice Print a mids object — print.mids • mice Print a mads object — print.mads • mice
+Print a mads object — print.mads • mice
Skip to contents
diff --git a/reference/quickpred.html b/reference/quickpred.html
index 4f1dcb050..eb6e74f25 100644
--- a/reference/quickpred.html
+++ b/reference/quickpred.html
@@ -1,5 +1,5 @@
-Quick selection of predictors from the data — quickpred • mice
+Quick selection of predictors from the data — quickpred • mice
Skip to contents
diff --git a/reference/reexports.html b/reference/reexports.html
index c41c1a509..c4c0b64a0 100644
--- a/reference/reexports.html
+++ b/reference/reexports.html
@@ -1,5 +1,5 @@
-Objects exported from other packages — reexports • mice Objects exported from other packages — reexports • mice Self-reported and measured BMI — selfreport • mice Self-reported and measured BMI — selfreport • mice
Skip to contents
diff --git a/reference/squeeze.html b/reference/squeeze.html
index b710beed0..da2e70ed3 100644
--- a/reference/squeeze.html
+++ b/reference/squeeze.html
@@ -1,5 +1,5 @@
-Squeeze the imputed values to be within specified boundaries. — squeeze • mice Squeeze the imputed values to be within specified boundaries. — squeeze • mice Stripplot of observed and imputed data — stripplot.mids • mice Stripplot of observed and imputed data — stripplot.mids • mice Summary of a mira object — summary.mira • mice Summary of a mira object — summary.mira • mice Supports semi-transparent foreground colors? — supports.transparent • mice Supports semi-transparent foreground colors? — supports.transparent • mice
Skip to contents
diff --git a/reference/tbc.html b/reference/tbc.html
index 815e114ef..637682fe8 100644
--- a/reference/tbc.html
+++ b/reference/tbc.html
@@ -1,5 +1,5 @@
-Terneuzen birth cohort — tbc • mice
+Terneuzen birth cohort — tbc • mice
Skip to contents
diff --git a/reference/tidy.mipo.html b/reference/tidy.mipo.html
index 969fb518d..3c1cd72b9 100644
--- a/reference/tidy.mipo.html
+++ b/reference/tidy.mipo.html
@@ -1,5 +1,5 @@
-Tidy method to extract results from a `mipo` object — tidy.mipo • mice
+Tidy method to extract results from a `mipo` object — tidy.mipo • mice
Skip to contents
diff --git a/reference/toenail.html b/reference/toenail.html
index f694f18d0..93991166f 100644
--- a/reference/toenail.html
+++ b/reference/toenail.html
@@ -1,5 +1,5 @@
-Toenail data — toenail • mice Toenail data — toenail • mice Toenail data — toenail2 • mice Toenail data — toenail2 • mice Echoes the package version number — version • mice
+Echoes the package version number — version • mice
Skip to contents
@@ -69,7 +69,7 @@ On this page
diff --git a/reference/walking.html b/reference/walking.html
index 5ebbcab25..99ec49d3d 100644
--- a/reference/walking.html
+++ b/reference/walking.html
@@ -1,5 +1,5 @@
-Walking disability data — walking • mice
+Walking disability data — walking • mice
Skip to contents
diff --git a/reference/windspeed.html b/reference/windspeed.html
index c9d98dcce..94c063aa1 100644
--- a/reference/windspeed.html
+++ b/reference/windspeed.html
@@ -1,5 +1,5 @@
-Subset of Irish wind speed data — windspeed • mice
+Subset of Irish wind speed data — windspeed • mice
Skip to contents
diff --git a/reference/with.mids.html b/reference/with.mids.html
index 13580c7ff..fde1c7b50 100644
--- a/reference/with.mids.html
+++ b/reference/with.mids.html
@@ -1,5 +1,5 @@
-Evaluate an expression in multiple imputed datasets — with.mids • mice
+Evaluate an expression in multiple imputed datasets — with.mids • mice
Skip to contents
diff --git a/reference/xyplot.mads.html b/reference/xyplot.mads.html
index 562157417..2041d9e82 100644
--- a/reference/xyplot.mads.html
+++ b/reference/xyplot.mads.html
@@ -1,5 +1,5 @@
-Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads • mice Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads • mice Scatterplot of observed and imputed data — xyplot.mids • mice Scatterplot of observed and imputed data — xyplot.mids • mice Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice"},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"help-for-old-friends","dir":"Articles","previous_headings":"","what":"Help for old friends","title":"Help for old friends","text":"documents describes changes mice 2.46.0 mice 3.0.0. code written versions mice 2.12 - mice 2.46.0 run unchanged. tried minimize changes function arguments, possible remain 100% backward compatible. document outlines visible changes, suggests ways adapt old code mice 3.0.","code":""},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"mice-function-arguments","dir":"Articles","previous_headings":"Help for old friends","what":"mice function arguments","title":"Help for old friends","text":"changes made following arguments: data, m, , post, defaultMethod, maxit, printFlag, seed data.init. blocks specified, variable allocated separate block. case, length(blocks) identical ncol(data), method mice 3.0.0 reduces variable--variable imputation, mice 2.46.0 . Argument visitSequence may still specified integer numeric, internally converted character using column names data. existing function call mice using old form argument may result error Argument \"formulas\" list. advice specify formula list, e.g.,","code":"library(mice, warn.conflicts = FALSE) imp <- mice(nhanes, formulas = list( hyp ~ bmi, chl ~ age + hyp + bmi, bmi ~ age + hyp + chl ), print = FALSE, m = 1, maxit = 1, seed = 1 ) imp$formulas #> $hyp #> hyp ~ bmi #> #> $chl #> chl ~ age + hyp + bmi #> #> $bmi #> bmi ~ age + hyp + chl"},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"pool-function-uses-broom","dir":"Articles","previous_headings":"Help for old friends","what":"pool() function uses broom","title":"Help for old friends","text":"mice 2.46.0 used coef() vcov() extract parameters complete-data model. two problems approach: 1) coef() vcov() often defined analysis interest, 2) output standard across procedures. Older versions mice therefore needed quite custom code extract parameters variance estimates. mice 3.0.0 uses broom package task. advantage standardised output. downside (still) many packages offer defined tidy.xxx() glance.xxx() functions. cases, user sees error message Error: tidy methods objects class xxx. See pool() documentation cases.","code":""},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"pool-for-mixed-models-requires-librarybroom-mixed","dir":"Articles","previous_headings":"Help for old friends","what":"pool() for mixed models requires library(broom.mixed)","title":"Help for old friends","text":"mice automatically loads broom package. Tidiers mixed models live broom.mixed packages automatically loaded. want pool results mixed model, issue library(broom.mixed) calling pool() function.","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"software","dir":"Articles","previous_headings":"","what":"Software","title":"Overview","text":"mice package CRAN mice GitHUB repository","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Overview","text":"mice package can installed CRAN follows: latest version can installed GitHub follows:","code":"install.packages(\"mice\") install.packages(\"devtools\") devtools::install_github(\"amices/mice\")"},{"path":"https://amices.org/mice/articles/overview.html","id":"capabilities-of-mice-package","dir":"Articles","previous_headings":"","what":"Capabilities of mice package","title":"Overview","text":"mice package contains functions Inspect missing data pattern Impute missing data mm times, resulting mm completed data sets Diagnose quality imputed values Analyze completed data set Pool results repeated analyses Store export imputed data various formats Generate simulated incomplete data Incorporate custom imputation methods Choose cells impute","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"main-functions","dir":"Articles","previous_headings":"","what":"Main functions","title":"Overview","text":"main functions mice package :","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"course-materials","dir":"Articles","previous_headings":"","what":"Course materials","title":"Overview","text":"Handling Missing Data R mice Statistical Methods combined data sets","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"vignettes","dir":"Articles","previous_headings":"","what":"Vignettes","title":"Overview","text":"Ad hoc methods MICE algorithm Convergence pooling Inspecting observed data missingness related Passive imputation post-processing Combining inferences Imputing multilevel data Sensitivity analysis mice Generate missing values ampute parlMICE: Parallel MICE imputation wrapper futuremice: Wrapper parallel MICE imputation futures","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"related-packages","dir":"Articles","previous_headings":"","what":"Related packages","title":"Overview","text":"Packages extend functionality mice include: ImputeRobust: Multiple Imputation GAMLSS countimp: Incomplete count data miceadds: Functions multilevel imputation micemd: Functions multilevel imputation smcfcs: Addressing incompatibility selected models fancyimpyute: MICE Python ordinal data","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"further-reading","dir":"Articles","previous_headings":"","what":"Further reading","title":"Overview","text":"mice: Multivariate Imputation Chained Equations R Journal Statistical Software (Buuren Groothuis-Oudshoorn 2011). first application missing blood pressure data (Buuren, Boshuizen, Knook 1999). Term Fully Conditional Specification describes general class methods specify imputations model multivariate data set conditional distributions (Buuren et al. 2006). Details imputing mixes numerical categorical data can found (Buuren 2007). Book Flexible Imputation Missing Data. Second Edition (Buuren 2018).","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"code-from-publications","dir":"Articles","previous_headings":"","what":"Code from publications","title":"Overview","text":"R code Flexible Imputation Missing Data. Second Edition R code mice: Multivariate Imputation Chained Equations R","code":""},{"path":[]},{"path":"https://amices.org/mice/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Stef van Buuren. Author, maintainer. Karin Groothuis-Oudshoorn. Author. Gerko Vink. Contributor. Rianne Schouten. Contributor. Alexander Robitzsch. Contributor. Patrick Rockenschaub. Contributor. Lisa Doove. Contributor. Shahab Jolani. Contributor. Margarita Moreno-Betancur. Contributor. Ian White. Contributor. Philipp Gaffert. Contributor. Florian Meinfelder. Contributor. Bernie Gray. Contributor. Vincent Arel-Bundock. Contributor. Mingyang Cai. Contributor. Thom Volker. Contributor. Edoardo Costantini. Contributor. Caspar van Lissa. Contributor. Hanne Oberman. Contributor. Stephen Wade. Contributor.","code":""},{"path":"https://amices.org/mice/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Stef van Buuren, Karin Groothuis-Oudshoorn (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. DOI 10.18637/jss.v045.i03.","code":"@Article{, title = {{mice}: Multivariate Imputation by Chained Equations in R}, author = {Stef {van Buuren} and Karin Groothuis-Oudshoorn}, journal = {Journal of Statistical Software}, year = {2011}, volume = {45}, number = {3}, pages = {1-67}, doi = {10.18637/jss.v045.i03}, }"},{"path":[]},{"path":"https://amices.org/mice/index.html","id":"multivariate-imputation-by-chained-equations","dir":"","previous_headings":"","what":"Multivariate Imputation by Chained Equations","title":"Multivariate Imputation by Chained Equations","text":"mice package implements method deal missing data. package creates multiple imputations (replacement values) multivariate missing data. method based Fully Conditional Specification, incomplete variable imputed separate model. MICE algorithm can impute mixes continuous, binary, unordered categorical ordered categorical data. addition, MICE can impute continuous two-level data, maintain consistency imputations means passive imputation. Many diagnostic plots implemented inspect quality imputations.","code":""},{"path":"https://amices.org/mice/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Multivariate Imputation by Chained Equations","text":"mice package can installed CRAN follows: latest version can installed GitHub follows:","code":"install.packages(\"mice\") install.packages(\"devtools\") devtools::install_github(repo = \"amices/mice\")"},{"path":"https://amices.org/mice/index.html","id":"minimal-example","dir":"","previous_headings":"","what":"Minimal example","title":"Multivariate Imputation by Chained Equations","text":"Missing data pattern nhanes data. Blue observed, red missing. table graph summarize missing data occur nhanes dataset. Distribution chl per imputed data set. general, like imputations plausible, .e., values observed missing. complete-data fit imputed dataset, results combined arrive estimates properly account missing data.","code":"library(mice, warn.conflicts = FALSE) # show the missing data pattern md.pattern(nhanes) #> age hyp bmi chl #> 13 1 1 1 1 0 #> 3 1 1 1 0 1 #> 1 1 1 0 1 1 #> 1 1 0 0 1 2 #> 7 1 0 0 0 3 #> 0 8 9 10 27 # multiple impute the missing values imp <- mice(nhanes, maxit = 2, m = 2, seed = 1) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl # inspect quality of imputations stripplot(imp, chl, pch = 19, xlab = \"Imputation number\") # fit complete-data model fit <- with(imp, lm(chl ~ age + bmi)) # pool and summarize the results summary(pool(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 9.08 73.09 0.124 4.50 0.9065 #> 2 age 35.23 17.46 2.017 1.36 0.2377 #> 3 bmi 4.69 1.94 2.417 15.25 0.0286"},{"path":"https://amices.org/mice/index.html","id":"mice-30","dir":"","previous_headings":"","what":"mice 3.0","title":"Multivariate Imputation by Chained Equations","text":"Version 3.0 represents major update implements following features: blocks: main algorithm iterates blocks. block simply collection variables. common MICE algorithm block equivalent one variable, - course - default; blocks argument allows mixing univariate imputation method multivariate imputation methods. blocks feature bridges two seemingly disparate approaches, joint modeling fully conditional specification, one framework; : argument logical matrix size data specifies cells imputed. opens new analytic possibilities; Multivariate tests: new functions D1(), D2(), D3() anova() perform multivariate parameter tests repeated analysis multiply-imputed data; formulas: old form argument redesign now renamed formulas. provides alternative way specify imputation models exploits full power R’s native formula’s. Better integration tidyverse framework, especially packages dplyr, tibble broom; Improved numerical algorithms low-level imputation function. Better handling duplicate variables. Last least: brand new edition online version Flexible Imputation Missing Data. Second Edition. See MICE: Multivariate Imputation Chained Equations resources. ’ll happy take feedback discuss suggestions. Please submit Github’s issues facility.","code":""},{"path":[]},{"path":"https://amices.org/mice/index.html","id":"books","dir":"","previous_headings":"Resources","what":"Books","title":"Multivariate Imputation by Chained Equations","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition.. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/index.html","id":"course-materials","dir":"","previous_headings":"Resources","what":"Course materials","title":"Multivariate Imputation by Chained Equations","text":"Handling Missing Data R mice Statistical Methods combined data sets","code":""},{"path":"https://amices.org/mice/index.html","id":"vignettes","dir":"","previous_headings":"Resources","what":"Vignettes","title":"Multivariate Imputation by Chained Equations","text":"Ad hoc methods MICE algorithm Convergence pooling Inspecting observed data missingness related Passive imputation post-processing Imputing multilevel data Sensitivity analysis mice Generate missing values ampute futuremice: Wrapper parallel MICE imputation futures","code":""},{"path":"https://amices.org/mice/index.html","id":"code-from-publications","dir":"","previous_headings":"Resources","what":"Code from publications","title":"Multivariate Imputation by Chained Equations","text":"Flexible Imputation Missing Data. Second edition.","code":""},{"path":"https://amices.org/mice/index.html","id":"acknowledgement","dir":"","previous_headings":"","what":"Acknowledgement","title":"Multivariate Imputation by Chained Equations","text":"cute mice sticker designed Jaden M. Walters. Thanks Jaden!","code":""},{"path":"https://amices.org/mice/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Multivariate Imputation by Chained Equations","text":"Please note mice project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models using D1-statistic — D1","title":"Compare two nested models using D1-statistic — D1","text":"D1-statistics multivariate Wald test.","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models using D1-statistic — D1","text":"","code":"D1(fit1, fit0 = NULL, dfcom = NULL, df.com = NULL)"},{"path":"https://amices.org/mice/reference/D1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models using D1-statistic — D1","text":"fit1 object class mira, produced (). fit0 object class mira, produced (). model fit0 nested within fit1. default null model fit0 = NULL compares fit1 intercept-model. dfcom single number denoting complete-data degrees freedom model fit1. specified, set equal df.residual model fit1. done, procedure assumes (perhaps incorrectly) large sample. df.com Deprecated","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compare two nested models using D1-statistic — D1","text":"Warning: `D1()` assumes order variables different models. See https://github.com/amices/mice/issues/420 details.","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models using D1-statistic — D1","text":"Li, K. H., T. E. Raghunathan, D. B. Rubin. 1991. Large-Sample Significance Levels Multiply Imputed Data Using Moment-Based Statistics F Reference Distribution. Journal American Statistical Association, 86(416): 1065–73. https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:wald","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/D1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare two nested models using D1-statistic — D1","text":"","code":"# Compare two linear models: imp <- mice(nhanes2, seed = 51009, print = FALSE) mi1 <- with(data = imp, expr = lm(bmi ~ age + hyp + chl)) mi0 <- with(data = imp, expr = lm(bmi ~ age + hyp)) D1(mi1, mi0) #> test statistic df1 df2 dfcom p.value riv #> 1 ~~ 2 5.28351 1 4 20 0.08306791 0.671799 if (FALSE) { # \\dontrun{ # Compare two logistic regression models imp <- mice(boys, maxit = 2, print = FALSE) fit1 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc + reg, family = binomial)) fit0 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc, family = binomial)) D1(fit1, fit0) } # }"},{"path":"https://amices.org/mice/reference/D2.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models using D2-statistic — D2","title":"Compare two nested models using D2-statistic — D2","text":"D2-statistic pools test statistics repeated analyses. method less powerful D1- D3-statistics.","code":""},{"path":"https://amices.org/mice/reference/D2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models using D2-statistic — D2","text":"","code":"D2(fit1, fit0 = NULL, use = \"wald\")"},{"path":"https://amices.org/mice/reference/D2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models using D2-statistic — D2","text":"fit1 object class mira, produced (). fit0 object class mira, produced (). model fit0 nested within fit1. default null model fit0 = NULL compares fit1 intercept-model. use character string denoting Wald- likelihood-based based tests. Can either \"wald\" \"likelihood\". used method = \"D2\".","code":""},{"path":"https://amices.org/mice/reference/D2.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compare two nested models using D2-statistic — D2","text":"Warning: `D2()` assumes order variables different models. See https://github.com/amices/mice/issues/420 details.","code":""},{"path":"https://amices.org/mice/reference/D2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models using D2-statistic — D2","text":"Li, K. H., X. L. Meng, T. E. Raghunathan, D. B. Rubin. 1991. Significance Levels Repeated p-Values Multiply-Imputed Data. Statistica Sinica 1 (1): 65–92. https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:chi","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/D2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare two nested models using D2-statistic — D2","text":"","code":"# Compare two linear models: imp <- mice(nhanes2, seed = 51009, print = FALSE) mi1 <- with(data = imp, expr = lm(bmi ~ age + hyp + chl)) mi0 <- with(data = imp, expr = lm(bmi ~ age + hyp)) D2(mi1, mi0) #> test statistic df1 df2 dfcom p.value riv #> 1 ~~ 2 3.649642 1 11.69791 NA 0.08089545 1.408231 if (FALSE) { # \\dontrun{ # Compare two logistic regression models imp <- mice(boys, maxit = 2, print = FALSE) fit1 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc + reg, family = binomial)) fit0 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc, family = binomial)) D2(fit1, fit0) } # }"},{"path":"https://amices.org/mice/reference/D3.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models using D3-statistic — D3","title":"Compare two nested models using D3-statistic — D3","text":"D3-statistic likelihood-ratio test statistic.","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models using D3-statistic — D3","text":"","code":"D3(fit1, fit0 = NULL, dfcom = NULL, df.com = NULL)"},{"path":"https://amices.org/mice/reference/D3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models using D3-statistic — D3","text":"fit1 object class mira, produced (). fit0 object class mira, produced (). model fit0 nested within fit1. default null model fit0 = NULL compares fit1 intercept-model. dfcom single number denoting complete-data degrees freedom model fit1. specified, set equal df.residual model fit1. done, procedure assumes (perhaps incorrectly) large sample. df.com Deprecated","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare two nested models using D3-statistic — D3","text":"object class mice.anova","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compare two nested models using D3-statistic — D3","text":"D3() function implement LR-method Meng Rubin (1992). implementation method relies broom package, standard update mechanism statistical models R offset function. function calculates m repetitions full (null) models, calculates mean estimates (fixed) parameter coefficients \\(\\beta\\). imputed imputed dataset, calculates likelihood model parameters constrained \\(\\beta\\). mitml::testModels() function offers similar functionality subset statistical models. Results mice::D3() mitml::testModels() differ multilevel models testModels() also constrains variance components parameters. details ","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models using D3-statistic — D3","text":"Meng, X. L., D. B. Rubin. 1992. Performing Likelihood Ratio Tests Multiply-Imputed Data Sets. Biometrika, 79 (1): 103–11. https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:likelihoodratio http://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#setting-residual-variances---fixed-value-zero--","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/D3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare two nested models using D3-statistic — D3","text":"","code":"# Compare two linear models: imp <- mice(nhanes2, seed = 51009, print = FALSE) mi1 <- with(data = imp, expr = lm(bmi ~ age + hyp + chl)) mi0 <- with(data = imp, expr = lm(bmi ~ age + hyp)) D3(mi1, mi0) #> test statistic df1 df2 dfcom p.value riv #> 1 ~~ 2 2.917381 1 8.764849 20 0.122711 2.082143 if (FALSE) { # \\dontrun{ # Compare two logistic regression models imp <- mice(boys, maxit = 2, print = FALSE) fit1 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc + reg, family = binomial)) fit0 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc, family = binomial)) D3(fit1, fit0) } # }"},{"path":"https://amices.org/mice/reference/MCAR.html","id":null,"dir":"Reference","previous_headings":"","what":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Test whether missingness contingent upon observed variables, according methodology developed Jamshidian Jalal (2010) (see Details).","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"","code":"mcar( x, imputed = mice(x, method = \"norm\"), min_n = 6, method = \"auto\", replications = 10000, use_chisq = 30, alpha = 0.05 )"},{"path":"https://amices.org/mice/reference/MCAR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"x object method exists; usually data.frame. imputed Either object class mids, returned mice(), list data.frames. min_n Atomic numeric, must greater 1. missing data patterns fewer min_n cases, cases pattern removed x imputed. method Atomic character. known (assumed) data either multivariate normally distributed , use either method = \"hawkins\" method = \"nonparametric\", respectively. default argument method = \"auto\" follows procedure outlined Details section, Figure 7 Jamshidian Jalal (2010). replications Number replications used simulate Neyman distribution performing Hawkins' test. method based random sampling, use high number replications (optionally, set.seed()) minimize Monte Carlo error ensure reproducibility. use_chisq Atomic integer, indicating minimum number cases within group k triggers use asymptotic Chi-square distribution instead emprical distribution Neyman uniformity test, performed part Hawkins' test. alpha Atomic numeric, indicating significance level tests.","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"object class mcar_object.","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Three types missingness distinguished literature (Rubin, 1976): Missing completely random (MCAR), means missingness random; missing random (MAR), means missingness contingent observed; missing random (MNAR), means missingness related unobserved data. Jamshidian Jalal's non-parametric MCAR test assumes missing data either MCAR MAR, tests whether missingness independent observed values. , covariance matrices imputed data equal accross groups different patterns missingness. test consists following procedure: Data imputed. imputed data split k groups according k missing data patterns original data (see md.pattern()). Perform Hawkins' test equality covariances across k groups. test significant, conclude evidence multivariate normality data, MCAR. test significant, multivariate normality data can assumed, can concluded missingness MAR. multivariate normality assumed, perform Anderson-Darling non-parametric test equality covariances across k groups. Anderson-Darling test significant, evidence multivariate normality - evidence MCAR. Anderson-Darling test significant, evidence can concluded missingness MAR. Note , despite name common parlance, MCAR test can indicate whether missingness MCAR MAR. procedure distinguish MCAR MNAR, non-significant result rule MNAR. re-implementation function TestMCARNormality, originally published R-packgage MissMech, removed CRAN. new implementation faster, backend written C++. also enhances functionality original: Multiply imputed data can now used; median p-value test statistic across replications reported, suggested Eekhout, Wiel, Heymans (2017). printing method mcar_object gives warning least one p-value either test significant. case, recommended inspect range p-values, consider potential violations MCAR. plotting method mcar_object provided. plotting method $md.pattern element mcar_object provided.","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Rubin, D. B. (1976). Inference Missing Data. Biometrika, Vol. 63, . 3, pp. 581-592. doi:10.2307/2335739 Eekhout, ., M. . Wiel, & M. W. Heymans (2017). Methods Significance Testing Categorical Covariates Logistic Regression Models Multiple Imputation: Power Applicability Analysis. BMC Medical Research Methodology 17 (1): 129. Jamshidian, M., & Jalal, S. (2010). Tests homoscedasticity, normality, missing completely random incomplete multivariate data. Psychometrika, 75(4), 649–674. doi:10.1007/s11336-010-9175-3","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Caspar J. Van Lissa","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"","code":"res <- mcar(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # Examine test results res #> #> Missing data patterns: 2 used, 3 removed. #> Cases used: 20 #> #> Hawkins' test: median chi^2 (4) = 2.041792, median p = 0.7280723 #> #> #> Interpretation of results: #> Hawkins' test is not significant; there is no evidence to reject the assumptions of multivariate normality and MCAR. # Plot p-values across imputed data sets plot(res) # Plot md patterns used for the test plot(res, type = \"md.pattern\") # Note difference with the raw md.patterns: md.pattern(nhanes) #> age hyp bmi chl #> 13 1 1 1 1 0 #> 3 1 1 1 0 1 #> 1 1 1 0 1 1 #> 1 1 0 0 1 2 #> 7 1 0 0 0 3 #> 0 8 9 10 27"},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputation based on continuous probability functions — ampute.continuous","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"function creates missing data indicator pattern. continuous probability distributions (Van Buuren, 2012, pp. 63, 64) induced weighted sum scores, calculated earlier multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"","code":"ampute.continuous(P, scores, prop, type)"},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"P vector containing pattern numbers cases's candidacies. case, value 1 #patterns given. example, case value 2 candidate missing data pattern 2. scores list containing vectors candidates's weighted sum scores, result underlying function ampute. prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5. type vector strings containing type missingness pattern. Either \"LEFT\", \"MID\", \"TAIL\" '\"RIGHT\". single missingness type entered, patterns created type. missingness types differ patterns, vector missingness types entered. Default RIGHT patterns result ampute.default.type.","code":""},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"list containing vectors 0 case made missing 1 case remain complete. first vector refers first pattern, second vector second pattern, etcetera.","code":""},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"Rianne Schouten [aut, cre], Gerko Vink [aut], Peter Lugtig [ctb], 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":null,"dir":"Reference","previous_headings":"","what":"Default freq in ampute — ampute.default.freq","title":"Default freq in ampute — ampute.default.freq","text":"Defines default relative frequency vector multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default freq in ampute — ampute.default.freq","text":"","code":"ampute.default.freq(patterns)"},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default freq in ampute — ampute.default.freq","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default freq in ampute — ampute.default.freq","text":"vector length #patterns containing relative frequencies patterns occur. equal probability given pattern.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default freq in ampute — ampute.default.freq","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":null,"dir":"Reference","previous_headings":"","what":"Default odds in ampute() — ampute.default.odds","title":"Default odds in ampute() — ampute.default.odds","text":"Defines default odds matrix multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default odds in ampute() — ampute.default.odds","text":"","code":"ampute.default.odds(patterns)"},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default odds in ampute() — ampute.default.odds","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default odds in ampute() — ampute.default.odds","text":"matrix #rows equals #patterns. Default 4 quantiles odds values 1, 2, 3 4, pattern, imitating RIGHT type missingness.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default odds in ampute() — ampute.default.odds","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":null,"dir":"Reference","previous_headings":"","what":"Default patterns in ampute — ampute.default.patterns","title":"Default patterns in ampute — ampute.default.patterns","text":"function creates default pattern matrix multivariate amputation function ampute().","code":""},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default patterns in ampute — ampute.default.patterns","text":"","code":"ampute.default.patterns(n)"},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default patterns in ampute — ampute.default.patterns","text":"n scalar specifying number variables data.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default patterns in ampute — ampute.default.patterns","text":"square matrix size n 0 indicates variable","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default patterns in ampute — ampute.default.patterns","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":null,"dir":"Reference","previous_headings":"","what":"Default type in ampute() — ampute.default.type","title":"Default type in ampute() — ampute.default.type","text":"Defines default type vector multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default type in ampute() — ampute.default.type","text":"","code":"ampute.default.type(patterns)"},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default type in ampute() — ampute.default.type","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default type in ampute() — ampute.default.type","text":"string vector length #patterns containing missingness types. pattern amputed \"RIGHT\" missingness.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default type in ampute() — ampute.default.type","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Default weights in ampute — ampute.default.weights","title":"Default weights in ampute — ampute.default.weights","text":"Defines default weights matrix multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default weights in ampute — ampute.default.weights","text":"","code":"ampute.default.weights(patterns, mech)"},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default weights in ampute — ampute.default.weights","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns. mech string specifying missingness mechanism.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default weights in ampute — ampute.default.weights","text":"matrix size #patterns #variables containing weights used calculate weighted sum scores. Equal weights given variables. mechanism MAR, variables amputed weighted 0. MNAR, variables observed weighted 0. mechanism MCAR, weights matrix used. default MAR matrix returned.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default weights in ampute — ampute.default.weights","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputation based on discrete probability functions — ampute.discrete","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"function creates missing data indicator pattern. Odds probabilities (Brand, 1999, pp. 110-113) induced weighted sum scores, calculated earlier multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"","code":"ampute.discrete(P, scores, prop, odds)"},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"P vector containing pattern numbers candidates. case, value 1 #patterns given. example, case value 2 candidate missing data pattern 2. scores list containing vectors candidates's weighted sum scores, result underlying function ampute. prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5. odds matrix #patterns defines #rows. row contain odds missing corresponding pattern. amount odds values defines many quantiles sum scores divided. values relative probabilities: quantile odds value 4 probability missing four times higher quantile odds 1. #quantiles may differ patterns, specify NA cells remaining empty. Default 4 quantiles odds values 1, 2, 3 4, result ampute.default.odds.","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"list containing vectors 0 case made missing 1 case remain complete. first vector refers first pattern, second vector second pattern, etcetera.","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"Brand, J.P.L. (1999). Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate missing data for simulation purposes — ampute","title":"Generate missing data for simulation purposes — ampute","text":"function generates multivariate missing data MCAR, MAR MNAR missing data mechanism. Imputation data sets containing missing values can performed mice.","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate missing data for simulation purposes — ampute","text":"","code":"ampute( data, prop = 0.5, patterns = NULL, freq = NULL, mech = \"MAR\", weights = NULL, std = TRUE, cont = TRUE, type = NULL, odds = NULL, bycases = TRUE, run = TRUE )"},{"path":"https://amices.org/mice/reference/ampute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate missing data for simulation purposes — ampute","text":"data complete data matrix data frame. Values numeric. Categorical variables transformed dummies. prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5. patterns matrix data frame size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. user may specify many patterns desired. One pattern (vector) possible well. Default square matrix size #variables pattern missingness one variable (created ampute.default.patterns). amputation procedure, md.pattern can used investigate missing data patterns data. freq vector length #patterns containing relative frequency patterns occur. example, three missing data patterns, vector c(0.4, 0.4, 0.2), meaning cases missing values, 40 percent pattern 1, 40 percent pattern 2 20 percent pattern 3. vector sum 1. Default equal probability pattern, created ampute.default.freq. mech string specifying missingness mechanism, either \"MCAR\" (Missing Completely Random), \"MAR\" (Missing Random) \"MNAR\" (Missing Random). Default MAR missingness mechanism. weights matrix data frame size #patterns #variables. matrix contains weights used calculate weighted sum scores. MAR mechanism, weights variables made incomplete zero. MNAR mechanism, weights possible value. Furthermore, weights may differ patterns variables. may negative well. Within pattern, relative size values importance. default weights matrix made ampute.default.weights returns matrix equal weights variables. case MAR, variables amputed weighted 0. MNAR, variables observed weighted 0. mechanism MCAR, weights matrix used. std Logical. Whether weighted sum scores calculated standardized data non-standardized data. latter especially advised making use train test sets order prevent leakage. cont Logical. Whether probabilities based continuous discrete distribution. TRUE, probabilities missing based continuous logistic distribution function. ampute.continuous used calculate assign probabilities. probabilities based argument type. FALSE, probabilities missing based discrete distribution (ampute.discrete) based odds argument. Default TRUE. type string vector strings containing type missingness pattern. Either \"LEFT\", \"MID\", \"TAIL\" '\"RIGHT\". single missingness type given, patterns created type. missingness types differ patterns, vector missingness types given. Default RIGHT patterns result ampute.default.type. odds matrix #patterns defines #rows. row contain odds missing corresponding pattern. number odds values defines many quantiles sum scores divided. odds values relative probabilities: quantile odds value 4 probability missing four times higher quantile odds 1. number quantiles may differ patterns, specify NA cells remaining empty. Default 4 quantiles odds values 1, 2, 3 4 created ampute.default.odds. bycases Logical. TRUE, proportion missingness defined terms cases. FALSE, proportion missingness defined terms cells. Default TRUE. run Logical. TRUE, amputations implemented. FALSE, return object contain everything except amputed data set.","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate missing data for simulation purposes — ampute","text":"Returns S3 object class mads-class (multivariate amputed data set)","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate missing data for simulation purposes — ampute","text":"function generates missing values complete data sets. Amputation complete data sets useful evaluation imputation techniques, multiple imputation (performed function mice package). basic strategy underlying multivariate imputation suggested Don Rubin discussions 90's. Brand (1997) created one particular implementation, method found way FCS paper (Van Buuren et al, 2006). recently, univariate amputation procedures used generate missing data complete, simulated data sets. approach, variables made incomplete one variable time. one variable needs amputed, procedure repeated multiple times. univariate approach, difficult relate missingness one variable missingness another variable. multivariate amputation procedure solves issue moreover, justice multivariate nature data sets. Hence, ampute developed perform multivariate amputation. idea behind function specification several missingness patterns. pattern combination variables without missing values (denoted 0 1 respectively). example, one might want create two missingness patterns data set four variables. patterns something like: 0,0,1,1 1,0,1,0. combination zeros ones may occur. Furthermore, researcher specifies proportion missingness, either proportion missing cases proportion missing cells, relative frequency pattern occurs. Consequently, data split multiple subsets, one subset per pattern. Now, case candidate certain missingness pattern, whether case missing values eventually depends specifications. first specifications missing mechanism. three possible mechanisms: missingness depends completely chance (MCAR), missingness depends values observed variables (.e. variables remain complete) (MAR) values variables made incomplete (MNAR). discussion missingness mechanisms related observed data, refer doi:10.1177/0049124118799376 . user specifies missingness mechanism \"MCAR\", candidates equal probability becoming incomplete. \"MAR\" \"MNAR\" mechanism, weighted sum scores calculated. scores linear combination variables. order calculate weighted sum scores, data standardized. reason, data numeric. Second, case, values data set multiplied weights, specified argument weights. weighted scores summed, resulting weighted sum score case. weights may differ patterns may negative zero well. Naturally, case MAR mechanism, weights corresponding variables made incomplete, 0. Note may different pattern. case MNAR missingness, especially weights variables made incomplete importance. However, variables may weighted well. relative difference weights result effect sum scores. example, first missing data pattern mentioned , weights third fourth variables set 2 4. However, weight values 0.2 0.4 exact effect weighted sum score: fourth variable weighted twice much variable 3. Based weighted sum scores, either discrete continuous distribution probabilities used calculate whether candidate missing values. discrete distribution probabilities, weighted sum scores divided subgroups equal size (quantiles). Thereafter, user specifies subgroup odds missing. number subgroups odds values important generation missing data. example, RIGHT-like mechanism, scoring one higher quantiles high missingness odds, whereas MID-like mechanism, central groups higher odds. , size odds values importance, relative distance values. continuous distributions probabilities based logistic distribution function. user can specify type missingness, , , may differ patterns. example explanation arguments interact , refer vignette Generate missing values ampute amputation methodology published doi:10.1080/00949655.2018.1491577","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate missing data for simulation purposes — ampute","text":"Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. pp. 110-113. Dissertation. Rotterdam: Erasmus University. Schouten, R.M., Lugtig, P Vink, G. (2018) Generating missing values simulation purposes: multivariate amputation procedure. Journal Statistical Computation Simulation, 88(15): 1909-1930. doi:10.1080/00949655.2018.1491577 Schouten, R.M. Vink, G. (2018) Dance Mechanisms: Observed Information Influences Validity Missingness Assumptions. Sociological Methods Research, 50(3): 1243-1258. doi:10.1177/0049124118799376 Van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn, C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76(12): 1049-1064. doi:10.1080/10629360600810434 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Vink, G. (2016) Towards standardized evaluation multiple imputation routines.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate missing data for simulation purposes — ampute","text":"Rianne Schouten [aut, cre], Gerko Vink [aut], Peter Lugtig [ctb], 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate missing data for simulation purposes — ampute","text":"","code":"# start with a complete data set compl_boys <- cc(boys)[1:3] # Perform amputation with default settings mads_boys <- ampute(data = compl_boys) mads_boys$amp #> age hgt wgt #> 3279 8.859 124.8 31.0 #> 3283 8.867 NA 38.2 #> 3296 8.908 137.8 NA #> 3321 8.999 136.3 26.9 #> 3323 9.004 151.2 48.2 #> 3327 NA 141.4 29.4 #> 3357 9.119 140.0 28.0 #> 3388 9.201 125.8 22.0 #> 3398 9.234 139.8 35.6 #> 3409 9.270 140.4 32.0 #> 3416 9.303 142.2 31.6 #> 3422 9.316 147.4 31.4 #> 3429 9.368 132.7 25.9 #> 3442 9.407 134.4 27.0 #> 3449 9.426 NA 36.5 #> 3455 9.451 136.0 27.5 #> 3460 9.459 142.7 30.8 #> 3481 9.511 144.5 30.3 #> 3484 9.514 140.3 27.8 #> 3486 9.514 138.0 31.0 #> 3494 9.524 140.9 32.7 #> 3525 9.582 134.0 27.5 #> 3533 9.604 139.7 32.6 #> 3547 9.631 139.7 28.7 #> 3609 9.834 142.0 30.3 #> 3651 9.990 149.0 37.3 #> 3664 10.020 137.2 31.7 #> 3710 NA 134.0 26.5 #> 3721 10.154 139.3 30.6 #> 3724 10.160 141.3 39.5 #> 3727 10.171 135.2 31.9 #> 3805 10.398 149.8 34.7 #> 3814 10.422 158.8 NA #> 3827 10.447 148.7 41.0 #> 3834 10.477 142.6 NA #> 3841 10.499 148.6 38.6 #> 3865 10.554 146.3 40.4 #> 3873 10.568 151.0 36.6 #> 3880 10.581 141.2 33.8 #> 3929 10.724 144.1 29.5 #> 3975 10.888 147.0 33.8 #> 3988 NA 149.0 45.6 #> 3991 10.954 145.1 36.2 #> 3994 10.967 137.4 29.6 #> 3995 10.970 151.2 39.2 #> 4006 11.003 134.3 29.1 #> 4009 11.011 148.8 44.2 #> 4059 NA 139.6 32.7 #> 4066 11.143 135.1 25.0 #> 4067 NA 148.3 41.5 #> 4070 11.156 163.0 44.5 #> 4072 11.159 144.5 49.7 #> 4102 NA 151.8 44.4 #> 4122 11.288 159.4 43.4 #> 4173 11.446 147.9 42.2 #> 4174 11.446 NA 43.1 #> 4186 11.482 148.7 37.2 #> 4211 11.545 153.2 NA #> 4238 11.605 155.2 36.7 #> 4240 11.611 151.0 33.8 #> 4253 11.655 160.6 44.4 #> 4255 11.665 144.5 30.8 #> 4266 11.690 148.0 35.2 #> 4293 11.759 153.2 42.8 #> 4301 11.789 135.4 29.7 #> 4302 11.791 152.8 43.5 #> 4312 11.811 145.9 34.8 #> 4318 11.827 151.0 NA #> 4332 11.874 NA 32.5 #> 4349 11.926 156.5 44.5 #> 4399 12.071 151.1 NA #> 4465 12.265 NA 43.3 #> 4481 12.292 145.8 39.2 #> 4487 12.303 NA 44.0 #> 4505 12.375 157.2 61.0 #> 4532 12.457 NA 52.6 #> 4552 12.501 170.5 53.4 #> 4561 12.520 162.1 NA #> 4579 12.574 163.8 NA #> 4585 12.583 163.3 52.6 #> 4591 12.599 155.0 39.0 #> 4646 NA 172.0 79.5 #> 4682 12.821 170.2 56.0 #> 4721 NA 169.5 54.8 #> 4727 12.944 157.0 41.2 #> 4745 12.991 NA 31.1 #> 4748 12.993 155.9 42.3 #> 4752 12.996 158.9 49.1 #> 4809 13.108 164.0 61.7 #> 4823 NA 175.0 65.1 #> 4824 13.127 180.0 57.8 #> 4825 13.130 156.4 40.8 #> 4847 13.188 168.1 53.4 #> 4848 13.190 155.4 42.1 #> 4887 13.275 161.2 37.0 #> 4892 13.300 165.5 41.9 #> 4961 13.489 161.3 41.4 #> 4994 13.552 157.7 46.2 #> 5039 NA 179.0 54.9 #> 5044 13.642 NA 40.6 #> 5048 NA 175.4 74.8 #> 5064 13.686 168.7 46.1 #> 5085 13.749 155.5 36.5 #> 5113 13.839 162.1 NA #> 5126 13.883 176.2 48.1 #> 5130 13.891 174.6 54.2 #> 5133 13.897 181.7 61.9 #> 5147 13.924 144.8 35.1 #> 5159 13.938 156.9 NA #> 5206 NA 170.0 54.7 #> 5219 14.069 NA 59.2 #> 5228 14.083 172.1 50.9 #> 5247 14.121 159.2 42.7 #> 5288 14.209 NA 54.8 #> 5293 14.220 165.5 48.0 #> 5327 14.297 153.2 44.3 #> 5335 14.308 NA 56.0 #> 5343 NA 164.1 49.1 #> 5367 14.412 NA 54.2 #> 5410 14.527 160.7 52.0 #> 5415 14.540 182.4 76.0 #> 5416 14.543 NA 69.5 #> 5417 14.543 176.4 51.0 #> 5420 14.546 NA 61.0 #> 5478 14.669 NA 57.2 #> 5496 14.721 NA 50.7 #> 5509 14.762 168.6 NA #> 5520 NA 173.8 61.7 #> 5522 NA 179.0 66.5 #> 5539 NA 172.7 64.3 #> 5551 14.863 NA 66.3 #> 5567 14.926 177.4 58.3 #> 5585 14.967 NA 88.0 #> 5598 14.997 181.2 NA #> 5602 NA 188.0 91.6 #> 5610 15.025 185.5 NA #> 5612 NA 178.5 54.1 #> 5642 15.099 NA 74.5 #> 5654 15.129 176.9 58.6 #> 5675 NA 176.8 54.8 #> 5710 15.249 NA 89.0 #> 5714 15.266 175.2 62.5 #> 5763 15.411 NA 54.1 #> 5764 15.416 187.2 NA #> 5789 15.474 192.2 80.2 #> 5806 NA 172.0 52.3 #> 5823 15.542 171.0 50.0 #> 5830 15.556 183.3 61.5 #> 5856 15.622 NA 70.5 #> 5857 15.630 NA 52.6 #> 5858 15.633 NA 67.0 #> 5879 15.663 172.7 NA #> 5880 15.668 176.0 63.8 #> 5883 15.674 176.6 56.9 #> 5947 15.838 NA 63.5 #> 5964 15.893 NA 56.0 #> 5971 15.906 NA 57.5 #> 5975 15.912 180.0 65.2 #> 5986 NA 167.8 62.2 #> 6005 15.989 187.8 NA #> 6029 16.049 NA 70.6 #> 6033 NA 183.9 61.5 #> 6036 NA 184.4 68.5 #> 6037 NA 186.5 70.7 #> 6064 16.156 194.3 NA #> 6083 16.235 NA 60.0 #> 6085 16.246 183.5 76.0 #> 6092 NA 177.9 57.0 #> 6117 16.355 171.0 NA #> 6132 16.402 173.6 54.5 #> 6138 NA 195.5 69.0 #> 6141 16.435 175.1 64.5 #> 6166 16.492 188.0 62.5 #> 6185 NA 178.0 65.7 #> 6251 16.717 NA 66.4 #> 6253 NA 192.8 88.3 #> 6262 NA 189.8 70.3 #> 6283 16.807 184.3 77.0 #> 6343 16.966 182.4 63.7 #> 6361 16.999 179.0 68.1 #> 6372 17.018 183.0 NA #> 6416 NA 183.2 69.3 #> 6482 17.333 180.3 76.8 #> 6483 17.336 183.9 66.3 #> 6528 17.440 171.4 NA #> 6539 17.467 NA 55.5 #> 6567 NA 186.5 71.2 #> 6611 17.678 176.4 NA #> 6641 17.749 NA 94.9 #> 6647 NA 196.2 81.0 #> 6686 17.911 181.2 NA #> 6700 17.957 172.2 NA #> 6756 18.121 NA 58.4 #> 6782 18.209 NA 63.4 #> 6789 18.220 187.4 NA #> 6831 18.349 193.6 69.2 #> 6858 18.453 170.5 NA #> 6892 18.551 193.0 NA #> 6923 18.617 188.0 61.9 #> 6963 18.737 191.0 NA #> 6964 18.743 NA 99.0 #> 6977 18.773 NA 69.6 #> 6981 18.792 174.8 56.0 #> 7001 18.850 179.8 NA #> 7032 18.959 185.1 NA #> 7066 NA 180.8 93.8 #> 7068 19.063 NA 72.4 #> 7073 19.077 182.7 NA #> 7101 19.148 186.5 NA #> 7141 19.310 177.1 NA #> 7152 19.367 178.0 NA #> 7161 19.408 192.7 100.1 #> 7173 19.471 191.0 NA #> 7200 19.575 NA 88.9 #> 7221 19.633 NA 75.0 #> 7240 NA 172.5 70.6 #> 7247 19.739 NA 65.5 #> 7293 19.926 NA 117.4 #> 7297 19.934 181.8 NA #> 7319 NA 170.0 68.8 #> 7328 20.030 178.6 71.0 #> 7362 NA 188.7 89.4 #> 7396 NA 185.1 81.1 # Change default matrices as desired my_patterns <- mads_boys$patterns my_patterns[1:3, 2] <- 0 my_weights <- mads_boys$weights my_weights[2, 1] <- 2 my_weights[3, 1] <- 0.5 # Rerun amputation my_mads_boys <- ampute( data = compl_boys, patterns = my_patterns, freq = c(0.3, 0.3, 0.4), weights = my_weights, type = c(\"RIGHT\", \"TAIL\", \"LEFT\") ) my_mads_boys$amp #> age hgt wgt #> 3279 8.859 NA 31.0 #> 3283 8.867 145.0 38.2 #> 3296 8.908 137.8 30.0 #> 3321 8.999 NA NA #> 3323 9.004 151.2 48.2 #> 3327 9.021 NA NA #> 3357 9.119 NA NA #> 3388 9.201 NA NA #> 3398 9.234 NA 35.6 #> 3409 9.270 140.4 32.0 #> 3416 9.303 NA 31.6 #> 3422 9.316 147.4 31.4 #> 3429 9.368 132.7 25.9 #> 3442 9.407 NA 27.0 #> 3449 9.426 NA NA #> 3455 9.451 136.0 27.5 #> 3460 9.459 NA NA #> 3481 9.511 NA NA #> 3484 9.514 NA NA #> 3486 9.514 138.0 31.0 #> 3494 9.524 NA 32.7 #> 3525 9.582 NA 27.5 #> 3533 9.604 139.7 32.6 #> 3547 9.631 139.7 28.7 #> 3609 9.834 142.0 30.3 #> 3651 9.990 149.0 37.3 #> 3664 10.020 NA NA #> 3710 10.132 134.0 26.5 #> 3721 10.154 139.3 30.6 #> 3724 10.160 141.3 39.5 #> 3727 10.171 135.2 31.9 #> 3805 NA NA 34.7 #> 3814 10.422 NA NA #> 3827 NA NA 41.0 #> 3834 10.477 142.6 32.5 #> 3841 10.499 NA 38.6 #> 3865 10.554 146.3 40.4 #> 3873 10.568 151.0 36.6 #> 3880 10.581 NA 33.8 #> 3929 10.724 NA 29.5 #> 3975 10.888 147.0 33.8 #> 3988 NA NA 45.6 #> 3991 10.954 NA NA #> 3994 10.967 137.4 29.6 #> 3995 10.970 151.2 39.2 #> 4006 11.003 134.3 29.1 #> 4009 11.011 NA NA #> 4059 11.126 139.6 32.7 #> 4066 11.143 135.1 25.0 #> 4067 11.143 NA 41.5 #> 4070 11.156 NA NA #> 4072 11.159 NA NA #> 4102 NA NA 44.4 #> 4122 11.288 NA 43.4 #> 4173 11.446 147.9 42.2 #> 4174 11.446 NA NA #> 4186 11.482 148.7 37.2 #> 4211 11.545 NA NA #> 4238 11.605 NA NA #> 4240 11.611 151.0 33.8 #> 4253 11.655 NA NA #> 4255 11.665 144.5 30.8 #> 4266 11.690 NA NA #> 4293 11.759 NA NA #> 4301 11.789 135.4 29.7 #> 4302 11.791 152.8 43.5 #> 4312 11.811 145.9 34.8 #> 4318 11.827 151.0 33.0 #> 4332 11.874 NA NA #> 4349 11.926 156.5 44.5 #> 4399 12.071 151.1 34.5 #> 4465 12.265 NA 43.3 #> 4481 12.292 145.8 39.2 #> 4487 12.303 161.4 44.0 #> 4505 NA NA 61.0 #> 4532 NA NA 52.6 #> 4552 12.501 NA NA #> 4561 12.520 162.1 44.1 #> 4579 12.574 163.8 51.6 #> 4585 12.583 NA NA #> 4591 12.599 NA NA #> 4646 12.741 172.0 79.5 #> 4682 12.821 170.2 56.0 #> 4721 12.933 NA 54.8 #> 4727 12.944 NA NA #> 4745 12.991 148.7 31.1 #> 4748 12.993 155.9 42.3 #> 4752 12.996 158.9 49.1 #> 4809 13.108 164.0 61.7 #> 4823 13.127 175.0 65.1 #> 4824 13.127 NA 57.8 #> 4825 NA NA 40.8 #> 4847 13.188 NA 53.4 #> 4848 13.190 155.4 42.1 #> 4887 13.275 NA NA #> 4892 13.300 165.5 41.9 #> 4961 13.489 NA 41.4 #> 4994 13.552 157.7 46.2 #> 5039 13.631 179.0 54.9 #> 5044 13.642 NA 40.6 #> 5048 13.656 175.4 74.8 #> 5064 13.686 NA NA #> 5085 13.749 NA NA #> 5113 13.839 NA 44.9 #> 5126 13.883 176.2 48.1 #> 5130 13.891 174.6 54.2 #> 5133 13.897 181.7 61.9 #> 5147 13.924 144.8 35.1 #> 5159 NA NA 50.0 #> 5206 14.045 NA NA #> 5219 14.069 170.6 59.2 #> 5228 14.083 172.1 50.9 #> 5247 14.121 159.2 42.7 #> 5288 14.209 170.9 54.8 #> 5293 14.220 165.5 48.0 #> 5327 14.297 NA 44.3 #> 5335 14.308 NA NA #> 5343 14.332 164.1 49.1 #> 5367 NA NA 54.2 #> 5410 14.527 160.7 52.0 #> 5415 14.540 182.4 76.0 #> 5416 14.543 173.7 69.5 #> 5417 NA NA 51.0 #> 5420 14.546 NA NA #> 5478 NA NA 57.2 #> 5496 NA NA 50.7 #> 5509 14.762 NA 47.6 #> 5520 14.811 173.8 61.7 #> 5522 14.811 179.0 66.5 #> 5539 14.844 172.7 64.3 #> 5551 14.863 NA 66.3 #> 5567 14.926 177.4 58.3 #> 5585 14.967 174.1 88.0 #> 5598 14.997 NA NA #> 5602 15.003 188.0 91.6 #> 5610 NA NA 62.7 #> 5612 15.028 NA NA #> 5642 NA NA 74.5 #> 5654 15.129 176.9 58.6 #> 5675 15.162 176.8 54.8 #> 5710 NA NA 89.0 #> 5714 15.266 NA 62.5 #> 5763 15.411 NA 54.1 #> 5764 15.416 187.2 80.6 #> 5789 15.474 NA NA #> 5806 NA NA 52.3 #> 5823 15.542 171.0 50.0 #> 5830 15.556 NA NA #> 5856 15.622 184.1 70.5 #> 5857 15.630 174.3 52.6 #> 5858 15.633 186.0 67.0 #> 5879 15.663 NA 58.6 #> 5880 15.668 176.0 63.8 #> 5883 15.674 176.6 56.9 #> 5947 NA NA 63.5 #> 5964 15.893 168.6 56.0 #> 5971 15.906 176.2 57.5 #> 5975 15.912 180.0 65.2 #> 5986 NA NA 62.2 #> 6005 NA NA 64.8 #> 6029 16.049 186.7 70.6 #> 6033 NA NA 61.5 #> 6036 NA NA 68.5 #> 6037 16.068 186.5 70.7 #> 6064 16.156 NA NA #> 6083 16.235 185.4 60.0 #> 6085 16.246 NA NA #> 6092 16.273 NA NA #> 6117 16.355 171.0 59.1 #> 6132 NA NA 54.5 #> 6138 16.427 195.5 69.0 #> 6141 16.435 175.1 64.5 #> 6166 NA NA 62.5 #> 6185 16.544 178.0 65.7 #> 6251 16.717 NA NA #> 6253 16.720 192.8 88.3 #> 6262 16.741 189.8 70.3 #> 6283 16.807 184.3 77.0 #> 6343 16.966 182.4 63.7 #> 6361 16.999 179.0 68.1 #> 6372 17.018 NA 65.5 #> 6416 17.117 NA 69.3 #> 6482 17.333 NA 76.8 #> 6483 17.336 183.9 66.3 #> 6528 17.440 NA NA #> 6539 17.467 173.6 55.5 #> 6567 NA NA 71.2 #> 6611 17.678 NA NA #> 6641 17.749 174.0 94.9 #> 6647 17.757 NA 81.0 #> 6686 NA NA 86.8 #> 6700 17.957 172.2 64.5 #> 6756 NA NA 58.4 #> 6782 18.209 NA NA #> 6789 18.220 187.4 79.0 #> 6831 18.349 NA 69.2 #> 6858 18.453 NA NA #> 6892 18.551 193.0 71.7 #> 6923 18.617 188.0 61.9 #> 6963 NA NA 81.3 #> 6964 18.743 192.0 99.0 #> 6977 NA NA 69.6 #> 6981 18.792 174.8 56.0 #> 7001 18.850 NA 62.6 #> 7032 18.959 NA NA #> 7066 NA NA 93.8 #> 7068 19.063 175.0 72.4 #> 7073 19.077 182.7 70.0 #> 7101 NA NA 71.9 #> 7141 19.310 177.1 60.1 #> 7152 NA NA 78.1 #> 7161 NA NA 100.1 #> 7173 19.471 191.0 87.1 #> 7200 19.575 195.0 88.9 #> 7221 19.633 182.1 75.0 #> 7240 NA NA 70.6 #> 7247 19.739 177.0 65.5 #> 7293 19.926 NA 117.4 #> 7297 19.934 NA NA #> 7319 20.010 NA 68.8 #> 7328 20.030 178.6 71.0 #> 7362 NA NA 89.4 #> 7396 20.281 185.1 81.1"},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputation under a MCAR mechanism — ampute.mcar","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"function creates missing data indicator pattern, based MCAR missingness mechanism. function used multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"","code":"ampute.mcar(P, patterns, prop)"},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"P vector containing pattern numbers cases' candidates. case, value 1 #patterns given. example, case value 2 candidate missing data pattern 2. patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. user may specify many patterns desired. One pattern (vector) also possible. result ampute.default.patterns, default square matrix size #variables pattern missingness one variable . prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5.","code":""},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"list containing vectors 0 case made missing 1 case remain complete. first vector refers first pattern, second vector second pattern, etcetera.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/anova.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare several nested models — anova.mira","title":"Compare several nested models — anova.mira","text":"Compare several nested models","code":""},{"path":"https://amices.org/mice/reference/anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare several nested models — anova.mira","text":"","code":"# S3 method for class 'mira' anova(object, ..., method = \"D1\", use = \"wald\")"},{"path":"https://amices.org/mice/reference/anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare several nested models — anova.mira","text":"object Two objects class mira ... parameters passed D1(), D2(), D3() mitml::testModels. method Either \"D1\", \"D2\" \"D3\" use character indicating test statistic","code":""},{"path":"https://amices.org/mice/reference/anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare several nested models — anova.mira","text":"Object class mice.anova","code":""},{"path":"https://amices.org/mice/reference/appendbreak.html","id":null,"dir":"Reference","previous_headings":"","what":"Appends specified break to the data — appendbreak","title":"Appends specified break to the data — appendbreak","text":"custom function insert rows long data new pseudo-observations done specified break ages. column called first data logical data codes whether current row first subject id. Furthermore, function assumes columns age, occ, hgt.z, wgt.z bmi.z available. function used tbc data FIMD chapter 9. Check see action.","code":""},{"path":"https://amices.org/mice/reference/appendbreak.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Appends specified break to the data — appendbreak","text":"","code":"appendbreak(data, brk, warp.model = warp.model, id = NULL, typ = \"pred\")"},{"path":"https://amices.org/mice/reference/appendbreak.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Appends specified break to the data — appendbreak","text":"data data frame long long format brk vector break ages warp.model time warping model id subject identifier typ Label signal newly added observation","code":""},{"path":"https://amices.org/mice/reference/appendbreak.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Appends specified break to the data — appendbreak","text":"long data frame additional rows break ages","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts an imputed dataset (long format) into a mids object — as.mids","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"function converts imputed data stored long format object class mids. original incomplete dataset needs available know missing data . function useful convert back operations applied imputed data back mids object. may also used store multiply imputed data sets software format used mice.","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"","code":"as.mids(long, where = NULL, .imp = \".imp\", .id = \".id\")"},{"path":"https://amices.org/mice/reference/as.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"long multiply imputed data set long format, example produced call complete(..., action = 'long', include = TRUE), software. data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. .imp optional column number column name long, indicating imputation index. values assumed consecutive integers 0 m. Values 1 m correspond imputation index, value 0 indicates original data (missings). default, procedure search variable named \".imp\". .id optional column number column name long, indicating subject identification. specified, function searches variable named \".id\". variable found, values column define row names data element resulting mids object.","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"object class mids","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"function expects input data long sorted imputation number (variable \".imp\" default), sequence within imputation block.","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"","code":"# impute the nhanes dataset imp <- mice(nhanes, print = FALSE) # extract the data in long format X <- complete(imp, action = \"long\", include = TRUE) # create dataset with .imp variable as numeric X2 <- X # nhanes example without .id test1 <- as.mids(X) is.mids(test1) #> [1] TRUE identical(complete(test1, action = \"long\", include = TRUE), X) #> [1] TRUE # nhanes example without .id where .imp is numeric test2 <- as.mids(X2) is.mids(test2) #> [1] TRUE identical(complete(test2, action = \"long\", include = TRUE), X) #> [1] TRUE # nhanes example, where we explicitly specify .id as column 2 test3 <- as.mids(X, .id = \".id\") is.mids(test3) #> [1] TRUE identical(complete(test3, action = \"long\", include = TRUE), X) #> [1] TRUE # nhanes example with .id where .imp is numeric test4 <- as.mids(X2, .id = 6) is.mids(test4) #> [1] TRUE identical(complete(test4, action = \"long\", include = TRUE), X) #> [1] TRUE # example without an .id variable # variable .id not preserved X3 <- X[, -6] test5 <- as.mids(X3) is.mids(test5) #> [1] TRUE identical(complete(test5, action = \"long\", include = TRUE)[, -6], X[, -6]) #> [1] TRUE # as() syntax has fewer options test7 <- as(X, \"mids\") test8 <- as(X2, \"mids\") test9 <- as(X2[, -6], \"mids\") rev <- ncol(X):1 test10 <- as(X[, rev], \"mids\") # where argument copies also observed data into $imp element where <- matrix(TRUE, nrow = nrow(nhanes), ncol = ncol(nhanes)) colnames(where) <- colnames(nhanes) test11 <- as.mids(X, where = where) identical(complete(test11, action = \"long\", include = TRUE), X) #> [1] TRUE"},{"path":"https://amices.org/mice/reference/as.mira.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a mira object from repeated analyses — as.mira","title":"Create a mira object from repeated analyses — as.mira","text":".mira() function takes results repeated complete-data analysis stored list, turns mira object can pooled.","code":""},{"path":"https://amices.org/mice/reference/as.mira.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a mira object from repeated analyses — as.mira","text":"","code":"as.mira(fitlist)"},{"path":"https://amices.org/mice/reference/as.mira.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a mira object from repeated analyses — as.mira","text":"fitlist list containing $m$ fitted analysis objects","code":""},{"path":"https://amices.org/mice/reference/as.mira.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a mira object from repeated analyses — as.mira","text":"S3 object class mira.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/as.mira.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a mira object from repeated analyses — as.mira","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts into a mitml.result object — as.mitml.result","title":"Converts into a mitml.result object — as.mitml.result","text":".mitml.result() function takes results repeated complete-data analysis stored list, turns object class mitml.result.","code":""},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts into a mitml.result object — as.mitml.result","text":"","code":"as.mitml.result(x)"},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts into a mitml.result object — as.mitml.result","text":"x object class mira","code":""},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts into a mitml.result object — as.mitml.result","text":"S3 object class mitml.result, list containing $m$ fitted analysis objects.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Converts into a mitml.result object — as.mitml.result","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":null,"dir":"Reference","previous_headings":"","what":"Growth of Dutch boys — boys","title":"Growth of Dutch boys — boys","text":"Height, weight, head circumference puberty 748 Dutch boys.","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Growth of Dutch boys — boys","text":"data frame 748 rows following 9 variables: age Decimal age (0-21 years) hgt Height (cm) wgt Weight (kg) bmi Body mass index hc Head circumference (cm) gen Genital Tanner stage (G1-G5) phb Pubic hair (Tanner P1-P6) tv Testicular volume (ml) reg Region (north, east, west, south, city)","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Growth of Dutch boys — boys","text":"Fredriks, .M,, van Buuren, S., Burgmeijer, R.J., Meulmeester JF, Beuker, R.J., Brugman, E., Roede, M.J., Verloove-Vanhorick, S.P., Wit, J.M. (2000) Continuing positive secular growth change Netherlands 1955-1997. Pediatric Research, 47, 316-323. Fredriks, .M., van Buuren, S., Wit, J.M., Verloove-Vanhorick, S.P. (2000). Body index measurements 1996-7 compared 1980. Archives Disease Childhood, 82, 107-112.","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Growth of Dutch boys — boys","text":"Random sample 10% cross-sectional data used construct Dutch growth references 1997. Variables gen phb ordered factors. reg factor.","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Growth of Dutch boys — boys","text":"","code":"# create two imputed data sets imp <- mice(boys, m = 1, maxit = 2) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 2 1 hgt wgt bmi hc gen phb tv reg z <- complete(imp, 1) # create imputations for age <8yrs plot(z$age, z$gen, col = mdc(1:2)[1 + is.na(boys$gen)], xlab = \"Age (years)\", ylab = \"Tanner Stage Genital\" ) # figure to show that the default imputation method does not impute BMI # consistently plot(z$bmi, z$wgt / (z$hgt / 100)^2, col = mdc(1:2)[1 + is.na(boys$bmi)], xlab = \"Imputed BMI\", ylab = \"Calculated BMI\" ) # also, BMI distributions are somewhat different oldpar <- par(mfrow = c(1, 2)) MASS::truehist(z$bmi[!is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(1), xlab = \"BMI observed\" ) MASS::truehist(z$bmi[is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(2), xlab = \"BMI imputed\" ) par(oldpar) # repair the inconsistency problem by passive imputation meth <- imp$meth meth[\"bmi\"] <- \"~I(wgt/(hgt/100)^2)\" pred <- imp$predictorMatrix pred[\"hgt\", \"bmi\"] <- 0 pred[\"wgt\", \"bmi\"] <- 0 imp2 <- mice(boys, m = 1, maxit = 2, meth = meth, pred = pred) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 2 1 hgt wgt bmi hc gen phb tv reg z2 <- complete(imp2, 1) # show that new imputations are consistent plot(z2$bmi, z2$wgt / (z2$hgt / 100)^2, col = mdc(1:2)[1 + is.na(boys$bmi)], ylab = \"Calculated BMI\" ) # and compare distributions oldpar <- par(mfrow = c(1, 2)) MASS::truehist(z2$bmi[!is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(1), xlab = \"BMI observed\" ) MASS::truehist(z2$bmi[is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(2), xlab = \"BMI imputed\" ) par(oldpar)"},{"path":"https://amices.org/mice/reference/brandsma.html","id":null,"dir":"Reference","previous_headings":"","what":"Brandsma school data used Snijders and Bosker (2012) — brandsma","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"Dataset raw data Snijders Bosker (2012) containing data 4106 pupils attending 216 schools. dataset includes pupils schools missing data.","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"brandsma data frame 4106 rows 14 columns: sch School number pup Pupil ID iqv IQ verbal iqp IQ performal sex Sex pupil ses SES score pupil min Minority member 0/1 rpg Number repeated groups, 0, 1, 2 lpr language score PRE lpo language score POST apr Arithmetic score PRE apo Arithmetic score POST den Denomination classification 1-4 - school level ssi School SES indicator - school level","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"Constructed MLbook_2nded_total_4106-99.sav https://www.stats.ox.ac.uk/~snijders/mlbook.htm function data-raw/R/brandsma.R","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"dataset constructed raw data. differences data set used Chapter 4 5 Snijders Bosker: schools included, including five school missing values langpost. Missing denomina codes left missing. Aggregates undefined presence missing data underlying values. Variables ses, iqv iqp original scale, globally centered. aggregate variables school level included. wider selection original variables. Note however source data contain even wider set variables.","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"Brandsma, HP Knuver, JWM (1989), Effects school classroom characteristics pupil progress language arithmetic. International Journal Educational Research, 13(7), 777 - 788. Snijders, TAB Bosker RJ (2012). Multilevel Analysis, 2nd Ed. Sage, Los Angeles, 2012.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"Plotting method investigate relation data variables amputed data. function shows amputed values related variable values.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"","code":"# S3 method for class 'mads' bwplot( x, data, which.pat = NULL, standardized = TRUE, descriptives = TRUE, layout = NULL, ... )"},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"x mads (mads-class) object, typically created ampute. data string vector variable names needs plotted. default, variables plotted. .pat scalar vector indicating patterns need plotted. default, patterns plotted. standardized Logical. Whether box--whisker plots need created standardized data . Default TRUE. descriptives Logical. Whether mean, variance n variables need printed. useful examine effect amputation. Default TRUE. layout vector two values indicating boxplots one pattern divided plot. example, c(2, 3) indicates boxplots six variables need placed 3 rows 2 columns. Default 1 row amount columns equal #variables. Note 6 variables, multiple plots created automatically. ... used, consistency generic","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"list containing box--whisker plots. Note new pattern always shown new plot.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"mads object contains information need make desired plots. Check mads-class vignette Multivariate Amputation using Ampute understand contents class object mads.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Box-and-whisker plot of observed and imputed data — bwplot.mids","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"Plotting methods imputed data using lattice. bwplot produces box--whisker plots. function automatically separates observed imputed data. functions extend usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"","code":"# S3 method for class 'mids' bwplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, theme = mice.theme(), mayreplicate = TRUE, allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. convenience, stripplot() bwplot formula y~.imp may abbreviated y. applies single y, (yet) work y1+y2~.imp. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. mayreplicate logical indicating whether color, line widths, , may replicated. graphical functions attempt choose \"intelligent\" graphical parameters. example, color can replicated different element, e.g. use reds imputed data. Replication may switched setting flag FALSE, order allow user gain full control. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg ### box-and-whisker plot per imputation of all numerical variables bwplot(imp) ### tv (testicular volume), conditional on region bwplot(imp, tv ~ .imp | reg) ### same data, organized in a different way bwplot(imp, tv ~ reg | .imp, theme = list())"},{"path":"https://amices.org/mice/reference/cbind.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine R objects by rows and columns — cbind","title":"Combine R objects by rows and columns — cbind","text":"Functions cbind() rbind() defined mice package order enable dispatch cbind.mids() rbind.mids() one arguments data.frame.","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine R objects by rows and columns — cbind","text":"","code":"cbind(...) rbind(...)"},{"path":"https://amices.org/mice/reference/cbind.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine R objects by rows and columns — cbind","text":"... Arguments passed base::cbind deparse.level integer controlling construction labels case non-matrix-like arguments (default method):deparse.level = 0 constructs labels; default deparse.level = 1 typically deparse.level = 2 always construct labels argument names, see ‘Value’ section .","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine R objects by rows and columns — cbind","text":"S3 object class mids","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine R objects by rows and columns — cbind","text":"standard base::cbind() base::rbind() always dispatch base::cbind.data.frame() base::rbind.data.frame() one arguments data.frame. versions defined mice package intercept user command test whether first argument class \"mids\". , function calls cbind.mids(), respectively rbind.mids(). cases, call forwarded standard functions base package. cbind.mids() function combines two mids objects columnwise single object class mids, combines single mids object vector, matrix, factor data.frame columnwise mids object. arguments cbind.mids() mids-objects, data list components number rows. Also, number imputations (m) identical. second argument matrix, factor vector, transformed data.frame. number rows match data component first argument. cbind.mids() function renames duplicated variable block names appending \".1\", \".2\" duplicated names. rbind.mids() function combines two mids objects rowwise single mids object, combines mids object vector, matrix, factor data frame rowwise mids object. arguments rbind.mids() mids objects, rbind.mids() requires number multiple imputations. addition, data components match. second argument rbind.mids() mids object, columns arguments match. matrix second argument set FALSE, signalling missing values argument imputed. ignore vector second argument set FALSE. Rows inherited second argument therefore influence parameter estimation imputation model future iterations.","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Combine R objects by rows and columns — cbind","text":"cbind.mids() function constructs elements new mids object follows: rbind.mids() function constructs elements new mids object follows:","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Combine R objects by rows and columns — cbind","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/cbind.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Combine R objects by rows and columns — cbind","text":"Karin Groothuis-Oudshoorn, Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine R objects by rows and columns — cbind","text":"","code":"# --- cbind --- # impute four variables at once (default) imp <- mice(nhanes, m = 1, maxit = 1, print = FALSE) imp$predictorMatrix #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 # impute two by two data1 <- nhanes[, c(\"age\", \"bmi\")] data2 <- nhanes[, c(\"hyp\", \"chl\")] imp1 <- mice(data1, m = 2, maxit = 1, print = FALSE) imp2 <- mice(data2, m = 2, maxit = 1, print = FALSE) # Append two solutions imp12 <- cbind(imp1, imp2) # This is a different imputation model imp12$predictorMatrix #> age bmi hyp chl #> age 0 1 0 0 #> bmi 1 0 0 0 #> hyp 0 0 0 1 #> chl 0 0 1 0 # Append the other way around imp21 <- cbind(imp2, imp1) imp21$predictorMatrix #> hyp chl age bmi #> hyp 0 1 0 0 #> chl 1 0 0 0 #> age 0 0 0 1 #> bmi 0 0 1 0 # Append 'forgotten' variable chl data3 <- nhanes[, 1:3] imp3 <- mice(data3, maxit = 1, m = 2, print = FALSE) imp4 <- cbind(imp3, chl = nhanes$chl) # Of course, chl was not imputed head(complete(imp4)) #> age bmi hyp chl #> 1 1 30.1 1 NA #> 2 2 22.7 1 187 #> 3 1 35.3 1 187 #> 4 3 27.5 1 NA #> 5 1 20.4 1 113 #> 6 3 22.7 1 184 # Combine mids object with data frame imp5 <- cbind(imp3, nhanes2) head(complete(imp5)) #> age bmi hyp age.1 bmi.1 hyp.1 chl #> 1 1 30.1 1 20-39 NA NA #> 2 2 22.7 1 40-59 22.7 no 187 #> 3 1 35.3 1 20-39 NA no 187 #> 4 3 27.5 1 60-99 NA NA #> 5 1 20.4 1 20-39 20.4 no 113 #> 6 3 22.7 1 60-99 NA 184 # --- rbind --- imp1 <- mice(nhanes[1:13, ], m = 2, maxit = 1, print = FALSE) #> Warning: Number of logged events: 1 imp5 <- mice(nhanes[1:13, ], m = 2, maxit = 2, print = FALSE) #> Warning: Number of logged events: 1 mylist <- list(age = NA, bmi = NA, hyp = NA, chl = NA) nrow(complete(rbind(imp1, imp5))) #> Warning: iterations differ, so no convergence diagnostics calculated #> [1] 26 nrow(complete(rbind(imp1, mylist))) #> [1] 14 nrow(complete(rbind(imp1, data.frame(mylist)))) #> [1] 14 nrow(complete(rbind(imp1, complete(imp5)))) #> [1] 26"},{"path":"https://amices.org/mice/reference/cc.html","id":null,"dir":"Reference","previous_headings":"","what":"Select complete cases — cc","title":"Select complete cases — cc","text":"Extracts complete cases, also known listwise deletion. cc(x) similar na.omit(x), returns object class input data. Dimensions dropped. extracting incomplete cases, use ici.","code":""},{"path":"https://amices.org/mice/reference/cc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select complete cases — cc","text":"","code":"cc(x)"},{"path":"https://amices.org/mice/reference/cc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select complete cases — cc","text":"x R object. Methods available classes mids, data.frame matrix. Also, x vector.","code":""},{"path":"https://amices.org/mice/reference/cc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select complete cases — cc","text":"vector, matrix data.frame containing data complete cases.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/cc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Select complete cases — cc","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/cc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select complete cases — cc","text":"","code":"# cc(nhanes) # get the 13 complete cases # cc(nhanes$bmi) # extract complete bmi"},{"path":"https://amices.org/mice/reference/cci.html","id":null,"dir":"Reference","previous_headings":"","what":"Complete case indicator — cci","title":"Complete case indicator — cci","text":"complete case indicator useful extracting subset complete cases. function cci(x) calls complete.cases(x). companion function ici() selects incomplete cases.","code":""},{"path":"https://amices.org/mice/reference/cci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complete case indicator — cci","text":"","code":"cci(x)"},{"path":"https://amices.org/mice/reference/cci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complete case indicator — cci","text":"x R object. Currently supported methods following classes: mids.","code":""},{"path":"https://amices.org/mice/reference/cci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Complete case indicator — cci","text":"Logical vector indicating complete cases.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/cci.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Complete case indicator — cci","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/cci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Complete case indicator — cci","text":"","code":"cci(nhanes) # indicator for 13 complete cases #> [1] FALSE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE #> [13] TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE #> [25] TRUE cci(mice(nhanes, maxit = 0)) #> [1] FALSE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE #> [13] TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE #> [25] TRUE f <- cci(nhanes[, c(\"bmi\", \"hyp\")]) # complete data for bmi and hyp nhanes[f, ] # obtain all data from those with complete bmi and hyp #> age bmi hyp chl #> 2 2 22.7 1 187 #> 5 1 20.4 1 113 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 NA #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 NA #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 NA #> 25 2 27.4 1 186"},{"path":"https://amices.org/mice/reference/complete.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts the completed data from a mids object — complete.mids","title":"Extracts the completed data from a mids object — complete.mids","text":"Takes object class mids, fills missing data, returns completed data specified format.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts the completed data from a mids object — complete.mids","text":"","code":"# S3 method for class 'mids' complete( data, action = 1L, include = FALSE, mild = FALSE, order = c(\"last\", \"first\"), ... )"},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts the completed data from a mids object — complete.mids","text":"data object class mids created function mice(). action numeric vector keyword. Numeric values 1 data$m return data imputation number action filled . value action = 0 return original data, missing values. action can also one following keywords: \"\", \"long\", \"broad\" \"repeated\". See Details section interpretation. default action = 1L returns first imputed data set. include logical indicate whether original data missing values included. mild logical indicating whether return value always object class mild. Setting mild = TRUE overrides action keywords \"long\", \"broad\" \"repeated\". default FALSE. order Either \"first\" \"last\". relevant action == \"long\". Writes \".imp\" \".id\" columns 1 2. default order = \"last\". Included backward compatibility \"< mice 3.16.0\". ... Additional arguments. used.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts the completed data from a mids object — complete.mids","text":"Complete data set missing values replaced imputations. data.frame, list data frames class mild.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extracts the completed data from a mids object — complete.mids","text":"argument action can length-1 character, matched one following keywords: \"\" produces mild object imputed data sets. include = TRUE, original data appended first list element; \"long\" produces data set imputed data sets stacked vertically. columns added: 1) .imp, integer, referring imputation number, 2) .id, character, row names data$data; \"stacked\" \"long\" without two additional columns; \"broad\" produces data set imputed data sets stacked horizontally. Columns ordered original data. imputation number appended column name; \"repeated\" \"broad\", columns different order.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extracts the completed data from a mids object — complete.mids","text":"Technical note: mice 3.7.5 renamed complete() function complete.mids() exported S3 method generic tidyr::complete(). Name clashes mice::complete() tidyr::complete() longer occur.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts the completed data from a mids object — complete.mids","text":"","code":"# obtain first imputed data set sum(is.na(nhanes2)) #> [1] 27 imp <- mice(nhanes2, print = FALSE, maxit = 1) dat <- complete(imp) sum(is.na(dat)) #> [1] 0 # obtain stacked third and fifth imputation dat <- complete(imp, c(3, 5)) # obtain all datasets, with additional identifiers head(complete(imp, \"long\")) #> age bmi hyp chl .imp .id #> 1 20-39 30.1 no 229 1 1 #> 2 40-59 22.7 no 187 1 2 #> 3 20-39 33.2 no 187 1 3 #> 4 60-99 21.7 no 284 1 4 #> 5 20-39 20.4 no 113 1 5 #> 6 60-99 21.7 no 184 1 6 # same, but now as list, mild object dslist <- complete(imp, \"all\") length(dslist) #> [1] 5 # same, but also include the original data dslist <- complete(imp, \"all\", include = TRUE) length(dslist) #> [1] 6 # select original + 3 + 5, store as mild dslist <- complete(imp, c(0, 3, 5), mild = TRUE) names(dslist) #> [1] \"0\" \"3\" \"5\""},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct blocks from formulas and predictorMatrix — construct.blocks","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"helper function attempts find blocks variables specification formulas /predictorMatrix objects. Blocks specified formulas may consist multiple variables. Blocks specified predictorMatrix assumed consist single variables. duplicates names removed, formula specification preferred. predictorMatrix formulas. arguments specify models block, model predictMatrix removed, priority given specification given formulas.","code":""},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"","code":"construct.blocks(formulas = NULL, predictorMatrix = NULL)"},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. predictorMatrix numeric matrix length(blocks) rows ncol(data) columns, containing 0/1 data specifying set predictors used target column. row corresponds variable block, .e., set variables imputed. value 1 means column variable used predictor target block (rows). default, predictorMatrix square matrix ncol(data) rows columns 1's, except diagonal. Note: two-level imputation models (\"2l\" names) codes (e.g, 2 -2) also allowed.","code":""},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"blocks object.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"","code":"form <- list(bmi + hyp ~ chl + age, chl ~ bmi) pred <- make.predictorMatrix(nhanes[, c(\"age\", \"chl\")]) construct.blocks(formulas = form, pred = pred) #> $F1 #> [1] \"bmi\" \"hyp\" #> #> $chl #> [1] \"chl\" #> #> $age #> [1] \"age\" #> #> attr(,\"calltype\") #> F1 chl age #> \"formula\" \"formula\" \"pred\""},{"path":"https://amices.org/mice/reference/convergence.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes convergence diagnostics for a mids object — convergence","title":"Computes convergence diagnostics for a mids object — convergence","text":"Takes object class mids, computes autocorrelation /potential scale reduction factor, returns data.frame specified diagnostic(s) per iteration.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes convergence diagnostics for a mids object — convergence","text":"","code":"convergence(data, diagnostic = \"all\", parameter = \"mean\", ...)"},{"path":"https://amices.org/mice/reference/convergence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes convergence diagnostics for a mids object — convergence","text":"data object class mids created function mice(). diagnostic keyword. One following keywords: \"ac\", \"\", \"gr\" \"psrf\". See Details section interpretation. default diagnostic = \"\" returns autocorrelation potential scale reduction factor per iteration. parameter keyword. One following keywords: \"mean\" \"sd\" evaluate chain means chain standard deviations, respectively. ... Additional arguments. used.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes convergence diagnostics for a mids object — convergence","text":"data.frame autocorrelation /potential scale reduction factor per iteration MICE algorithm.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Computes convergence diagnostics for a mids object — convergence","text":"argument diagnostic can length-1 character, matched one following keywords: \"\" computes lag-1 autocorrelation well potential scale reduction factor (cf. Vehtari et al., 2021) per iteration MICE algorithm; \"ac\" computes autocorrelation per iteration; \"psrf\" computes potential scale reduction factor per iteration; \"gr\" psrf, potential scale reduction factor colloquially called Gelman-Rubin diagnostic. unlikely event perfect convergence, autocorrelation equals zero potential scale reduction factor equals one. interpret convergence diagnostic(s) output function, recommended plot diagnostics (ac /psrf) iteration number (.) per imputed variable (vrb). persistently decreasing trend across iterations indicates potential non-convergence.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Computes convergence diagnostics for a mids object — convergence","text":"Vehtari, ., Gelman, ., Simpson, D., Carpenter, B., & Burkner, P.-C. (2021). Rank-Normalization, Folding, Localization: Improved R Assessing Convergence MCMC. Bayesian Analysis, 1(1), 1-38. https://doi.org/10.1214/20-BA1221","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/convergence.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Computes convergence diagnostics for a mids object — convergence","text":"","code":"if (FALSE) { # \\dontrun{ # obtain imputed data set imp <- mice(nhanes2, print = FALSE) # compute convergence diagnostics convergence(imp) } # }"},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Density plot of observed and imputed data — densityplot.mids","title":"Density plot of observed and imputed data — densityplot.mids","text":"Plotting methods imputed data using lattice. densityplot produces plots densities. function automatically separates observed imputed data. functions extend usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Density plot of observed and imputed data — densityplot.mids","text":"","code":"# S3 method for class 'mids' densityplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, plot.points = FALSE, theme = mice.theme(), mayreplicate = TRUE, thicker = 2.5, allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), panel = lattice::lattice.getOption(\"panel.densityplot\"), default.prepanel = lattice::lattice.getOption(\"prepanel.default.densityplot\"), ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Density plot of observed and imputed data — densityplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. function densityplot use y terms formula. Density plots x1 x2 requested ~ x1 + x2. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. plot.points logical used densityplot signals whether points plotted. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. mayreplicate logical indicating whether color, line widths, , may replicated. graphical functions attempt choose \"intelligent\" graphical parameters. example, color can replicated different element, e.g. use reds imputed data. Replication may switched setting flag FALSE, order allow user gain full control. thicker Used densityplot. Multiplication factor line width observed density. thicker=1 uses thickness observed imputed data. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. panel See xyplot. default.prepanel See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Density plot of observed and imputed data — densityplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Density plot of observed and imputed data — densityplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Density plot of observed and imputed data — densityplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation. densityplot errs empty groups, occurs observations subgroup contain NA. relevant error message : Error density.default: ... need least 2 points select bandwidth automatically. yet workaround problem. Use robust bwplot stripplot replacement.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Density plot of observed and imputed data — densityplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Density plot of observed and imputed data — densityplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Density plot of observed and imputed data — densityplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg ### density plot of head circumference per imputation ### blue is observed, red is imputed densityplot(imp, ~ hc | .imp) ### All combined in one panel. densityplot(imp, ~hc)"},{"path":"https://amices.org/mice/reference/employee.html","id":null,"dir":"Reference","previous_headings":"","what":"Employee selection data — employee","title":"Employee selection data — employee","text":"toy example Craig Enders.","code":""},{"path":"https://amices.org/mice/reference/employee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Employee selection data — employee","text":"","code":"employee"},{"path":"https://amices.org/mice/reference/employee.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Employee selection data — employee","text":"data frame 20 rows 3 variables: IQ candidate IQ score wbeing candidate well-score jobperf candidate job performance score","code":""},{"path":"https://amices.org/mice/reference/employee.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Employee selection data — employee","text":"Enders (2010), Applied Missing Data Analysis, p. 218","code":""},{"path":"https://amices.org/mice/reference/employee.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Employee selection data — employee","text":"Enders describes data follows: designed data mimic employee selection scenario prospective employees complete IQ test psychological well-questionnaire interview. company subsequently hires applications score upper half IQ distribution, supervisor rates job performance following 6-month probationary period. Note job performance scores missing random (MAR) (.e. individuals lower half IQ distribution never hired, thus performance rating). addition, randomly deleted three well-scores order mimic situation applicant's well-questionnaire inadvertently lost. larger version data set present data.enders.employee.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes least squares parameters — estimice","title":"Computes least squares parameters — estimice","text":"function computes least squares estimates, variance/covariance matrices, residuals degrees freedom according ridge regression, QR decomposition Singular Value Decomposition. function internally called .norm.draw(), can called user-specified imputation function.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes least squares parameters — estimice","text":"","code":"estimice(x, y, ls.meth = \"qr\", ridge = 1e-05, ...)"},{"path":"https://amices.org/mice/reference/estimice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes least squares parameters — estimice","text":"x Matrix (n x p) complete covariates. y Incomplete data vector length n ls.meth method use obtaining least squares estimates. default parameters drawn means QR decomposition. ridge small numerical value specifying size ridge used. default value ridge = 1e-05 represents compromise stability unbiasedness. Decrease ridge data contain many junk variables. Increase ridge highly collinear data. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes least squares parameters — estimice","text":"list containing components c (least squares estimate), r (residuals), v (variance/covariance matrix) df (degrees freedom).","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Computes least squares parameters — estimice","text":"calculating inverse crossproduct predictor matrix, problems may arise. example, taking inverse possible predictor matrix rank deficient, estimation problem computationally singular. function detects error cases automatically falls back adding ridge penalty diagonal crossproduct allow proper calculation inverse.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Computes least squares parameters — estimice","text":"functions adds star variable names mice iteration history signal ridge penalty added. case, also adds entry loggedEvents.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Computes least squares parameters — estimice","text":"Gerko Vink, 2018","code":""},{"path":"https://amices.org/mice/reference/extend.formula.html","id":null,"dir":"Reference","previous_headings":"","what":"Extends a formula with predictors — extend.formula","title":"Extends a formula with predictors — extend.formula","text":"Extends formula predictors","code":""},{"path":"https://amices.org/mice/reference/extend.formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extends a formula with predictors — extend.formula","text":"","code":"extend.formula( formula = ~0, predictors = NULL, auxiliary = TRUE, include.intercept = FALSE, ... )"},{"path":"https://amices.org/mice/reference/extend.formula.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extends a formula with predictors — extend.formula","text":"formula formula. formula, formula internally reset ~0. predictors character vector variable names. auxiliary logical indicates whether variables listed predictors added formula main effects. default TRUE. include.intercept logical indicated whether intercept included result.","code":""},{"path":"https://amices.org/mice/reference/extend.formula.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extends a formula with predictors — extend.formula","text":"formula","code":""},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":null,"dir":"Reference","previous_headings":"","what":"Extends formula's with predictor matrix settings — extend.formulas","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"Extends formula's predictor matrix settings","code":""},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"","code":"extend.formulas( formulas, data, blocks, predictorMatrix = NULL, auxiliary = TRUE, include.intercept = FALSE, ... )"},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. data data frame matrix containing incomplete data. Missing values coded NA. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. predictorMatrix numeric matrix length(blocks) rows ncol(data) columns, containing 0/1 data specifying set predictors used target column. row corresponds variable block, .e., set variables imputed. value 1 means column variable used predictor target block (rows). default, predictorMatrix square matrix ncol(data) rows columns 1's, except diagonal. Note: two-level imputation models (\"2l\" names) codes (e.g, 2 -2) also allowed. auxiliary logical indicates whether variables listed predictors added formula main effects. default TRUE. include.intercept logical indicated whether intercept included result. ... Named arguments passed univariate imputation functions.","code":""},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"list formula's","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract broken stick estimates from a lmer object — extractBS","title":"Extract broken stick estimates from a lmer object — extractBS","text":"Extract broken stick estimates lmer object","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract broken stick estimates from a lmer object — extractBS","text":"","code":"extractBS(fit)"},{"path":"https://amices.org/mice/reference/extractBS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract broken stick estimates from a lmer object — extractBS","text":"fit object class lmer","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract broken stick estimates from a lmer object — extractBS","text":"matrix containing broken stick estimates","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract broken stick estimates from a lmer object — extractBS","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":null,"dir":"Reference","previous_headings":"","what":"SE Fireworks disaster data — fdd","title":"SE Fireworks disaster data — fdd","text":"Multiple outcomes randomized study reduce post-traumatic stress.","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"SE Fireworks disaster data — fdd","text":"fdd data frame 52 rows 65 columns: id Client number trt Treatment (E=EMDR, C=CBT) pp Per protocol (Y/N) trtp Number parental treatments sex Sex: M/F etn Ethnicity: NL/age Age (years) trauma Trauma count (1-5) prop1 PROPS total score T1 prop2 PROPS total score T2 prop3 PROPS total score T3 crop1 CROPS total score T1 crop2 CROPS total score T2 crop3 CROPS total score T3 masc1 MASC score T1 masc2 MASC score T2 masc3 MASC score T3 cbcl1 CBCL T1 cbcl3 CBCL T3 prs1 PRS total score T1 prs2 PRS total score T2 prs3 PRS total score T3 ypa1 PTSD-RI B intrusive recollection parent T1 ypb1 PTSD-RI C avoidant/numbing parent T1 ypc1 PTSD-RI D hyper-arousal parent T1 yp1 PTSD-RI B+C+D parent T1 ypa2 PTSD-RI B intrusive recollection parent T2 ypb2 PTSD-RI C avoidant/numbing parent T2 ypc2 PTSD-RI D hyper-arousal parent T2 yp2 PTSD-RI B+C+D parent T1 ypa3 PTSD-RI B intrusive recollection parent T3 ypb3 PTSD-RI C avoidant/numbing parent T3 ypc3 PTSD-RI D hyper-arousal parent T3 yp3 PTSD-RI B+C+D parent T3 yca1 PTSD-RI B intrusive recollection child T1 ycb1 PTSD-RI C avoidant/numbing child T1 ycc1 PTSD-RI D hyper-arousal child T1 yc1 PTSD-RI B+C+D child T1 yca2 PTSD-RI B intrusive recollection child T2 ycb2 PTSD-RI C avoidant/numbing child T2 ycc2 PTSD-RI D hyper-arousal child T2 yc2 PTSD-RI B+C+D child T2 yca3 PTSD-RI B intrusive recollection child T3 ycb3 PTSD-RI C avoidant/numbing child T3 ycc3 PTSD-RI D hyper-arousal child T3 yc3 PTSD-RI B+C+D child T3 ypf1 PTSD-RI parent full T1 ypf2 PTSD-RI parent full T2 ypf3 PTSD-RI parent full T3 ypp1 PTSD parent partial T1 ypp2 PTSD parent partial T2 ypp3 PTSD parent partial T3 ycf1 PTSD child full T1 ycf2 PTSD child full T2 ycf3 PTSD child full T3 ycp1 PTSD child partial T1 ycp2 PTSD child partial T2 ycp3 PTSD child partial T3 cbin1 CBCL Internalizing T1 cbin3 CBCL Internalizing T3 cbex1 CBCL Externalizing T1 cbex3 CBCL Externalizing T3 bir1 Birlison T1 bir2 Birlison T2 bir3 Birlison T3 fdd.pred 65 65 binary predictor matrix used impute fdd.","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"SE Fireworks disaster data — fdd","text":"de Roos, C., Greenwald, R., den Hollander-Gijsman, M., Noorthoorn, E., van Buuren, S., de Jong, . (2011). Randomised Comparison Cognitive Behavioral Therapy (CBT) Eye Movement Desensitisation Reprocessing (EMDR) disaster-exposed children. European Journal Psychotraumatology, 2, 5694. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Boca Raton, FL.: Chapman & Hall/CRC Press.","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"SE Fireworks disaster data — fdd","text":"Data randomized experiment reduce post-traumatic stress two treatments: Eye Movement Desensitization Reprocessing (EMDR) (experimental treatment), cognitive behavioral therapy (CBT) (control treatment). 52 children randomized one two treatments. Outcomes measured three time points: baseline (pre-treatment, T1), post-treatment (T2, 4-8 weeks), follow-(T3, 3 months). details, see de Roos et al (2011). person covariates reshuffled. imputation methodology explained Chapter 9 van Buuren (2012).","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"SE Fireworks disaster data — fdd","text":"","code":"data <- fdd md.pattern(fdd) #> id trt pp sex etn age ypf1 ypf2 ypf3 ypp2 ypp3 ycf1 ycf2 ycf3 ycp2 ycp3 trtp #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 #> prop1 prs1 trauma ypp1 ypa1 ypb1 ypc1 yp1 prop2 prs2 ypa2 ypb2 ypc2 yp2 prop3 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 #> 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 #> 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 2 5 5 6 6 6 6 8 8 8 8 8 8 10 #> ypa3 ypb3 ypc3 yp3 cbcl1 cbin1 cbex1 crop1 bir1 cbcl3 cbin3 cbex3 yca1 ycb1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 #> 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 #> 9 1 1 1 1 1 1 1 0 0 1 1 1 0 0 #> 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 #> 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 #> 2 1 1 1 1 0 0 0 0 0 0 0 0 0 0 #> 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 #> 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 #> 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 #> 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 #> 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 #> 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 #> 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 #> 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 #> 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 #> 10 10 10 10 11 11 11 13 14 15 15 15 16 16 #> ycc1 yc1 ycp1 masc1 crop2 crop3 yca2 ycb2 ycc2 yc2 bir2 bir3 prs3 yca3 ycb3 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 #> 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 9 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 #> 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 #> 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 1 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 #> 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 16 16 16 17 22 22 22 22 22 22 22 22 23 24 24 #> ycc3 yc3 masc2 masc3 #> 8 1 1 1 1 0 #> 2 1 1 0 0 2 #> 1 0 0 1 1 4 #> 8 1 1 1 1 1 #> 1 1 1 0 0 3 #> 1 1 1 1 1 2 #> 1 1 1 1 1 5 #> 1 1 1 1 1 4 #> 9 0 0 0 0 22 #> 1 1 1 1 1 7 #> 1 1 1 1 1 10 #> 2 0 0 0 0 28 #> 1 0 0 0 0 14 #> 1 0 0 0 0 15 #> 1 1 1 1 1 9 #> 1 1 1 0 0 15 #> 1 0 0 0 0 29 #> 1 0 0 0 0 32 #> 1 0 0 0 0 39 #> 1 0 0 0 0 37 #> 1 1 1 1 1 6 #> 1 1 1 1 0 13 #> 1 0 0 0 0 40 #> 1 0 0 0 1 10 #> 1 0 0 0 0 23 #> 1 0 0 0 0 40 #> 1 0 0 0 0 36 #> 1 0 0 0 0 30 #> 24 24 27 27 689"},{"path":"https://amices.org/mice/reference/fdgs.html","id":null,"dir":"Reference","previous_headings":"","what":"Fifth Dutch growth study 2009 — fdgs","title":"Fifth Dutch growth study 2009 — fdgs","text":"Age, height, weight region 10030 children measured within Fifth Dutch Growth Study 2009","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Fifth Dutch growth study 2009 — fdgs","text":"fdgs data frame 10030 rows 8 columns: id Person number reg Region (factor, 5 levels) age Age (years) sex Sex (boy, girl) hgt Height (cm) wgt Weight (kg) hgt.z Height Z-score wgt.z Weight Z-score","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Fifth Dutch growth study 2009 — fdgs","text":"Schonbeck, Y., Talma, H., van Dommelen, P., Bakker, B., Buitendijk, S. E., Hirasing, R. ., van Buuren, S. (2011). Increase prevalence overweight Dutch children adolescents: comparison nationwide growth studies 1980, 1997 2009. PLoS ONE, 6(11), e27608. Schonbeck, Y., Talma, H., van Dommelen, P., Bakker, B., Buitendijk, S. E., Hirasing, R. ., van Buuren, S. (2013). world's tallest nation stopped growing taller: height Dutch children 1955 2009. Pediatric Research, 73(3), 371-377. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Boca Raton, FL.: Chapman & Hall/CRC Press.","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fifth Dutch growth study 2009 — fdgs","text":"data set contains data children Dutch descent (biological parents born Netherlands). Children growth-related diseases excluded. data used construct new growth charts children Dutch descent (Schonbeck 2013), calculate overweight obesity prevalence (Schonbeck 2011). groups underrepresented. Multiple imputation used create synthetic cases used correct nonresponse. See Van Buuren (2012), chapter 8 details.","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fifth Dutch growth study 2009 — fdgs","text":"","code":"data <- data(fdgs) summary(data) #> Length Class Mode #> 1 character character"},{"path":"https://amices.org/mice/reference/fico.html","id":null,"dir":"Reference","previous_headings":"","what":"Fraction of incomplete cases among cases with observed — fico","title":"Fraction of incomplete cases among cases with observed — fico","text":"FICO outbound statistic defined fraction incomplete cases among cases Yj observed (White Carlin, 2010).","code":""},{"path":"https://amices.org/mice/reference/fico.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fraction of incomplete cases among cases with observed — fico","text":"","code":"fico(data)"},{"path":"https://amices.org/mice/reference/fico.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fraction of incomplete cases among cases with observed — fico","text":"data data frame matrix containing incomplete data. Missing values coded NA's.","code":""},{"path":"https://amices.org/mice/reference/fico.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fraction of incomplete cases among cases with observed — fico","text":"vector length ncol(data) FICO statistics.","code":""},{"path":"https://amices.org/mice/reference/fico.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fraction of incomplete cases among cases with observed — fico","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. White, .R., Carlin, J.B. (2010). Bias efficiency multiple imputation compared complete-case analysis missing covariate values. Statistics Medicine, 29, 2920-2931.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/fico.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fraction of incomplete cases among cases with observed — fico","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset rows of a mids object — filter.mids","title":"Subset rows of a mids object — filter.mids","text":"function takes mids object returns new mids object pertains subset data identified expression .... expression may use column values incomplete data .data$data.","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset rows of a mids object — filter.mids","text":"","code":"# S3 method for class 'mids' filter(.data, ..., .preserve = FALSE)"},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset rows of a mids object — filter.mids","text":".data mids object. ... Expressions return logical value, defined terms variables .data$data. multiple expressions specified, combined & operator. rows conditions evaluate TRUE kept. .preserve Relevant .data input grouped. .preserve = FALSE (default), grouping structure recalculated based resulting data, otherwise grouping kept .","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset rows of a mids object — filter.mids","text":"S3 object class mids","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Subset rows of a mids object — filter.mids","text":"function calculates logical vector include length nrow(.data$data). function constructs elements filtered mids object follows:","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset rows of a mids object — filter.mids","text":"Patrick Rockenschaub","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset rows of a mids object — filter.mids","text":"","code":"imp <- mice(nhanes, m = 2, maxit = 1, print = FALSE) # example with external logical vector imp_f <- filter(imp, c(rep(TRUE, 13), rep(FALSE, 12))) nrow(complete(imp)) #> [1] 25 nrow(complete(imp_f)) #> [1] 13 # example with calculated include vector imp_f2 <- filter(imp, age >= 2 & hyp == 1) nrow(complete(imp_f2)) # should be 5 #> [1] 5"},{"path":"https://amices.org/mice/reference/fix.coef.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix coefficients and update model — fix.coef","title":"Fix coefficients and update model — fix.coef","text":"Refits model specified set coefficients.","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix coefficients and update model — fix.coef","text":"","code":"fix.coef(model, beta = NULL)"},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix coefficients and update model — fix.coef","text":"model R model, e.g., produced lm glm beta numeric vector length(coef) model coefficients. vector named, coefficients given order coef(model). vector named, procedure attempts match names.","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix coefficients and update model — fix.coef","text":"updated R model object","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fix coefficients and update model — fix.coef","text":"function calculates linear predictor using new coefficients, reformulates model using offset argument. linear predictor called offset, coefficient 1 definition. new model fits intercept, 0 set beta = coef(model).","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix coefficients and update model — fix.coef","text":"Stef van Buuren, 2018","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fix coefficients and update model — fix.coef","text":"","code":"model0 <- lm(Volume ~ Girth + Height, data = trees) formula(model0) #> Volume ~ Girth + Height #> coef(model0) #> (Intercept) Girth Height #> -57.9876589 4.7081605 0.3392512 deviance(model0) #> [1] 421.9214 # refit same model model1 <- fix.coef(model0) formula(model1) #> Volume ~ 1 #> coef(model1) #> (Intercept) #> 1.17136e-14 deviance(model1) #> [1] 421.9214 # change the beta's model2 <- fix.coef(model0, beta = c(-50, 5, 1)) coef(model2) #> (Intercept) #> -62.07097 deviance(model2) #> [1] 1098.984 # compare predictions plot(predict(model0), predict(model1)) abline(0, 1) plot(predict(model0), predict(model2)) abline(0, 1) # compare proportion explained variance cor(predict(model0), predict(model0) + residuals(model0))^2 #> [1] 0.94795 cor(predict(model1), predict(model1) + residuals(model1))^2 #> [1] 0.94795 cor(predict(model2), predict(model2) + residuals(model2))^2 #> [1] 0.9228528 # extract offset from constrained model summary(model2$offset) #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 57.00 82.00 87.00 92.24 102.25 140.00 # it also works with factors and missing data model0 <- lm(bmi ~ age + hyp + chl, data = nhanes2) model1 <- fix.coef(model0) model2 <- fix.coef(model0, beta = c(15, -8, -8, 2, 0.2))"},{"path":"https://amices.org/mice/reference/flux.html","id":null,"dir":"Reference","previous_headings":"","what":"Influx and outflux of multivariate missing data patterns — flux","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Influx outflux statistics missing data pattern. statistics useful selecting predictors go imputation model.","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Influx and outflux of multivariate missing data patterns — flux","text":"","code":"flux(data, local = names(data))"},{"path":"https://amices.org/mice/reference/flux.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Influx and outflux of multivariate missing data patterns — flux","text":"data data frame matrix containing incomplete data. Missing values coded NA's. local vector names columns data. default include columns calculations.","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Influx and outflux of multivariate missing data patterns — flux","text":"data frame ncol(data) rows six columns: pobs = Proportion observed, influx = Influx outflux = Outflux ainb = Average inbound statistic aout = Average outbound statistic fico = Fraction incomplete cases among cases Yj observed","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Infux outflux proposed Van Buuren (2018), chapter 4. Influx equal number variable pairs (Yj , Yk) Yj missing Yk observed, divided total number observed data cells. Influx depends proportion missing data variable. Influx completely observed variable equal 0, whereas completely missing variables influx = 1. two variables proportion missing data, variable higher influx better connected observed data, might thus easier impute. Outflux equal number variable pairs Yj observed Yk missing, divided total number incomplete data cells. Outflux indicator potential usefulness Yj imputing variables. Outflux depends proportion missing data variable. Outflux completely observed variable equal 1, whereas outflux completely missing variable equal 0. two variables proportion missing data, variable higher outflux better connected missing data, thus potentially useful imputing variables. FICO outbound statistic defined fraction incomplete cases among cases Yj observed (White Carlin, 2010).","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. White, .R., Carlin, J.B. (2010). Bias efficiency multiple imputation compared complete-case analysis missing covariate values. Statistics Medicine, 29, 2920-2931.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/flux.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Fluxplot of the missing data pattern — fluxplot","title":"Fluxplot of the missing data pattern — fluxplot","text":"Influx outflux statistics missing data pattern. statistics useful selecting predictors go imputation model.","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fluxplot of the missing data pattern — fluxplot","text":"","code":"fluxplot( data, local = names(data), plot = TRUE, labels = TRUE, xlim = c(0, 1), ylim = c(0, 1), las = 1, xlab = \"Influx\", ylab = \"Outflux\", main = paste(\"Influx-outflux pattern for\", deparse(substitute(data))), eqscplot = TRUE, pty = \"s\", lwd = 1, ... )"},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fluxplot of the missing data pattern — fluxplot","text":"data data frame matrix containing incomplete data. Missing values coded NA's. local vector names columns data. default include columns calculations. plot graph produced? labels points labeled? xlim See par. ylim See par. las See par. xlab See par. ylab See par. main See par. eqscplot square plot produced? pty See par. lwd See par. Controls axis line thickness diagonal ... arguments passed plot() eqscplot().","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fluxplot of the missing data pattern — fluxplot","text":"invisible data frame ncol(data) rows six columns: pobs = Proportion observed, influx = Influx outflux = Outflux ainb = Average inbound statistic aout = Average outbound statistic fico = Fraction incomplete cases among cases Yj observed","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fluxplot of the missing data pattern — fluxplot","text":"Infux outflux proposed Van Buuren (2012), chapter 4. Influx equal number variable pairs (Yj , Yk) Yj missing Yk observed, divided total number observed data cells. Influx depends proportion missing data variable. Influx completely observed variable equal 0, whereas completely missing variables influx = 1. two variables proportion missing data, variable higher influx better connected observed data, might thus easier impute. Outflux equal number variable pairs Yj observed Yk missing, divided total number incomplete data cells. Outflux indicator potential usefulness Yj imputing variables. Outflux depends proportion missing data variable. Outflux completely observed variable equal 1, whereas outflux completely missing variable equal 0. two variables proportion missing data, variable higher outflux better connected missing data, thus potentially useful imputing variables.","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fluxplot of the missing data pattern — fluxplot","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. White, .R., Carlin, J.B. (2010). Bias efficiency multiple imputation compared complete-case analysis missing covariate values. Statistics Medicine, 29, 2920-2931.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fluxplot of the missing data pattern — fluxplot","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function that runs MICE in parallel — futuremice","title":"Wrapper function that runs MICE in parallel — futuremice","text":"wrapper function mice, using multiple cores execute mice parallel. result, imputation procedure can sped , may useful general. default, futuremice distributes number imputations m equally cores.","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function that runs MICE in parallel — futuremice","text":"","code":"futuremice( data, m = 5, parallelseed = NA, n.core = NULL, seed = NA, use.logical = TRUE, future.plan = \"multisession\", packages = NULL, globals = NULL, ... )"},{"path":"https://amices.org/mice/reference/futuremice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function that runs MICE in parallel — futuremice","text":"data data frame matrix containing incomplete data. Similar first argument mice. m number desired imputated datasets. default $m=5$ mice parallelseed scalar used obtain reproducible results futures. default parallelseed = NA result seed value randomly drawn -999999999 999999999. n.core scalar indicating number cores used. seed scalar used seed value mice algorithm within parallel stream. Please note imputations streams , hence, used n.core = 1 desired obtain output mice. use.logical logical indicating whether logical (TRUE) physical (FALSE) CPU's machine used. future.plan character indicating futures resolved. default multisession resolves futures asynchronously (parallel) separate R sessions running background. See plan information future plans. packages character vector additional packages used mice (e.g., using external imputation functions). globals character string additional functions exported future (e.g., user-written imputation functions). ... Named arguments passed function mice.","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function that runs MICE in parallel — futuremice","text":"mids object defined mids-class","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrapper function that runs MICE in parallel — futuremice","text":"function relies package furrr, package R versions 3.2.0 later. chosen use furrr function future_map allow use futuremice Mac, Linux Windows systems. wrapper function combines output future_map function ibind mice package. mids object returned can used analyses. seed value can specified global environment, yield reproducible results. seed value can also specified within futuremice call, specifying argument parallelseed. parallelseed specified, seed value drawn randomly default, accessible $parallelseed output object. Hence, results always reproducible, regardless whether seed specified global environment, setting seed within function (potentially extracting seed futuremice output object.","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wrapper function that runs MICE in parallel — futuremice","text":"Volker, T.B. Vink, G. (2022). futuremice: future starts today. https://www.gerkovink.com/miceVignettes/futuremice/Vignette_futuremice.html Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/futuremice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper function that runs MICE in parallel — futuremice","text":"Thom Benjamin Volker, Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrapper function that runs MICE in parallel — futuremice","text":"","code":"# 150 imputations in dataset nhanes, performed by 3 cores if (FALSE) { # \\dontrun{ imp1 <- futuremice(data = nhanes, m = 150, n.core = 3) # Making use of arguments in mice. imp2 <- futuremice(data = nhanes, m = 100, method = \"norm.nob\") imp2$method fit <- with(imp2, lm(bmi ~ hyp)) pool(fit) } # }"},{"path":"https://amices.org/mice/reference/getfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract list of fitted models — getfit","title":"Extract list of fitted models — getfit","text":"Function getfit() returns list objects containing repeated analysis results, optionally, one fitted objects. function looks list element called analyses, return component list mira class. element analyses found x, returns x mira object.","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract list of fitted models — getfit","text":"","code":"getfit(x, i = -1L, simplify = FALSE)"},{"path":"https://amices.org/mice/reference/getfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract list of fitted models — getfit","text":"x object class mira, typically produced call (). integer 1 x$m signalling index repeated analysis. default = -1 return list analyses. simplify return value unlisted?","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract list of fitted models — getfit","text":"= -1 object class mira containing analyses. selects one analyses, return object whose class inherited element.","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract list of fitted models — getfit","text":"checking done validity objects. function also processes objects class mitml.result mitml package.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/getfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract list of fitted models — getfit","text":"Stef van Buuren, 2012, 2020","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract list of fitted models — getfit","text":"","code":"imp <- mice(nhanes, print = FALSE, seed = 21443) fit <- with(imp, lm(bmi ~ chl + hyp)) f1 <- getfit(fit) class(f1) #> [1] \"mira\" \"list\" f2 <- getfit(fit, 2) class(f2) #> [1] \"lm\""},{"path":"https://amices.org/mice/reference/getqbar.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract estimate from mipo object — getqbar","title":"Extract estimate from mipo object — getqbar","text":"getqbar returns named vector pooled estimates.","code":""},{"path":"https://amices.org/mice/reference/getqbar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract estimate from mipo object — getqbar","text":"","code":"getqbar(x)"},{"path":"https://amices.org/mice/reference/getqbar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract estimate from mipo object — getqbar","text":"x object class mipo","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance method to extract information from a `mipo` object — glance.mipo","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"Glance method extract information `mipo` object","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"","code":"# S3 method for class 'mipo' glance(x, ...)"},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"x object multiply-imputed models `mice` (class: `mipo`) ... extra arguments (used)","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"dataframe one row following columns: nimp nobs","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"x contains `lm` models, R2 Adj.R2 included output","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Generalized linear model for mids object — glm.mids","title":"Generalized linear model for mids object — glm.mids","text":"Applies glm() multiply imputed data set","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generalized linear model for mids object — glm.mids","text":"","code":"glm.mids(formula, family = gaussian, data, ...)"},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generalized linear model for mids object — glm.mids","text":"formula formula expression regression models, form response ~ predictors. See documentation lm formula details. family family glm model data object type mids, stands 'multiply imputed data set', typically created function mice(). ... Additional parameters passed glm.","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generalized linear model for mids object — glm.mids","text":"objects class mira, stands 'multiply imputed repeated analysis'. object contains data$m distinct glm.objects, plus descriptive information.","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generalized linear model for mids object — glm.mids","text":"function included backward compatibility V1.0. function superseded .mids.","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generalized linear model for mids object — glm.mids","text":"Van Buuren, S., Groothuis-Oudshoorn, C.G.M. (2000) Multivariate Imputation Chained Equations: MICE V1.0 User's manual. Leiden: TNO Quality Life.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generalized linear model for mids object — glm.mids","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generalized linear model for mids object — glm.mids","text":"","code":"imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # logistic regression on the imputed data fit <- glm.mids((hyp == 2) ~ bmi + chl, data = imp, family = binomial) #> Warning: Use with(imp, glm(yourmodel). fit #> call : #> glm.mids(formula = (hyp == 2) ~ bmi + chl, family = binomial, #> data = imp) #> #> call1 : #> mice(data = nhanes) #> #> nmis : #> age bmi hyp chl #> 0 9 8 10 #> #> analyses : #> [[1]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -4.98053 0.02486 0.01474 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 25.02 #> Residual Deviance: 23.12 \tAIC: 29.12 #> #> [[2]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -7.51505 0.02664 0.02666 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 25.02 #> Residual Deviance: 22.03 \tAIC: 28.03 #> #> [[3]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -7.92351 0.08376 0.02085 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 25.02 #> Residual Deviance: 22.3 \tAIC: 28.3 #> #> [[4]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -7.09719 0.01271 0.02846 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 29.65 #> Residual Deviance: 25.16 \tAIC: 31.16 #> #> [[5]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -2.55325 -0.10346 0.02218 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 29.65 #> Residual Deviance: 26.23 \tAIC: 32.23 #> #>"},{"path":"https://amices.org/mice/reference/ibind.html","id":null,"dir":"Reference","previous_headings":"","what":"Enlarge number of imputations by combining mids objects — ibind","title":"Enlarge number of imputations by combining mids objects — ibind","text":"function combines two mids objects x y single mids object, objective increasing number imputed data sets. number imputations x y m(x) m(y), combined object m(x)+m(y) imputations.","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enlarge number of imputations by combining mids objects — ibind","text":"","code":"ibind(x, y)"},{"path":"https://amices.org/mice/reference/ibind.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enlarge number of imputations by combining mids objects — ibind","text":"x mids object. y mids object.","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enlarge number of imputations by combining mids objects — ibind","text":"S3 object class mids","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Enlarge number of imputations by combining mids objects — ibind","text":"two mids objects required underlying multiple imputation model fitted data.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ibind.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Enlarge number of imputations by combining mids objects — ibind","text":"Karin Groothuis-Oudshoorn, Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enlarge number of imputations by combining mids objects — ibind","text":"","code":"data(nhanes) imp1 <- mice(nhanes, m = 1, maxit = 2, print = FALSE) imp1$m #> [1] 1 imp2 <- mice(nhanes, m = 3, maxit = 3, print = FALSE) imp2$m #> [1] 3 imp12 <- ibind(imp1, imp2) imp12$m #> [1] 4 plot(imp12)"},{"path":"https://amices.org/mice/reference/ic.html","id":null,"dir":"Reference","previous_headings":"","what":"Select incomplete cases — ic","title":"Select incomplete cases — ic","text":"Extracts incomplete cases data set. companion function selecting complete cases cc.","code":""},{"path":"https://amices.org/mice/reference/ic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select incomplete cases — ic","text":"","code":"ic(x)"},{"path":"https://amices.org/mice/reference/ic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select incomplete cases — ic","text":"x R object. Methods available classes mids, data.frame matrix. Also, x vector.","code":""},{"path":"https://amices.org/mice/reference/ic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select incomplete cases — ic","text":"vector, matrix data.frame containing data complete cases.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Select incomplete cases — ic","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/ic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select incomplete cases — ic","text":"","code":"ic(nhanes) # get the 12 rows with incomplete cases #> age bmi hyp chl #> 1 1 NA NA NA #> 3 1 NA 1 187 #> 4 3 NA NA NA #> 6 3 NA NA 184 #> 10 2 NA NA NA #> 11 1 NA NA NA #> 12 2 NA NA NA #> 15 1 29.6 1 NA #> 16 1 NA NA NA #> 20 3 25.5 2 NA #> 21 1 NA NA NA #> 24 3 24.9 1 NA ic(nhanes[1:10, ]) # incomplete cases within the first ten rows #> age bmi hyp chl #> 1 1 NA NA NA #> 3 1 NA 1 187 #> 4 3 NA NA NA #> 6 3 NA NA 184 #> 10 2 NA NA NA ic(nhanes[, c(\"bmi\", \"hyp\")]) # restrict extraction to variables bmi and hyp #> bmi hyp #> 1 NA NA #> 3 NA 1 #> 4 NA NA #> 6 NA NA #> 10 NA NA #> 11 NA NA #> 12 NA NA #> 16 NA NA #> 21 NA NA"},{"path":"https://amices.org/mice/reference/ici.html","id":null,"dir":"Reference","previous_headings":"","what":"Incomplete case indicator — ici","title":"Incomplete case indicator — ici","text":"array useful extracting subset incomplete cases. companion function cci() selects complete cases.","code":""},{"path":"https://amices.org/mice/reference/ici.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incomplete case indicator — ici","text":"","code":"ici(x)"},{"path":"https://amices.org/mice/reference/ici.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incomplete case indicator — ici","text":"x R object. Currently supported methods following classes: mids.","code":""},{"path":"https://amices.org/mice/reference/ici.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incomplete case indicator — ici","text":"Logical vector indicating incomplete cases,","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ici.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Incomplete case indicator — ici","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/ici.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incomplete case indicator — ici","text":"","code":"ici(nhanes) # indicator for 12 rows with incomplete cases #> [1] TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE #> [13] FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE #> [25] FALSE"},{"path":"https://amices.org/mice/reference/ifdo.html","id":null,"dir":"Reference","previous_headings":"","what":"Conditional imputation helper — ifdo","title":"Conditional imputation helper — ifdo","text":"Sorry, ifdo() function yet implemented.","code":""},{"path":"https://amices.org/mice/reference/ifdo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Conditional imputation helper — ifdo","text":"","code":"ifdo(cond, action)"},{"path":"https://amices.org/mice/reference/ifdo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Conditional imputation helper — ifdo","text":"cond condition action action ","code":""},{"path":"https://amices.org/mice/reference/ifdo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Conditional imputation helper — ifdo","text":"Currently returns error message.","code":""},{"path":"https://amices.org/mice/reference/ifdo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Conditional imputation helper — ifdo","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/is.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mads object — is.mads","title":"Check for mads object — is.mads","text":"Check mads object","code":""},{"path":"https://amices.org/mice/reference/is.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mads object — is.mads","text":"","code":"is.mads(x)"},{"path":"https://amices.org/mice/reference/is.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mads object — is.mads","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mads object — is.mads","text":"logical indicating whether x object class mads","code":""},{"path":"https://amices.org/mice/reference/is.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mids object — is.mids","title":"Check for mids object — is.mids","text":"Check mids object","code":""},{"path":"https://amices.org/mice/reference/is.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mids object — is.mids","text":"","code":"is.mids(x)"},{"path":"https://amices.org/mice/reference/is.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mids object — is.mids","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mids object — is.mids","text":"logical indicating whether x object class mids","code":""},{"path":"https://amices.org/mice/reference/is.mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mipo object — is.mipo","title":"Check for mipo object — is.mipo","text":"Check mipo object","code":""},{"path":"https://amices.org/mice/reference/is.mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mipo object — is.mipo","text":"","code":"is.mipo(x)"},{"path":"https://amices.org/mice/reference/is.mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mipo object — is.mipo","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mipo object — is.mipo","text":"logical indicating whether x object class mipo","code":""},{"path":"https://amices.org/mice/reference/is.mira.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mira object — is.mira","title":"Check for mira object — is.mira","text":"Check mira object","code":""},{"path":"https://amices.org/mice/reference/is.mira.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mira object — is.mira","text":"","code":"is.mira(x)"},{"path":"https://amices.org/mice/reference/is.mira.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mira object — is.mira","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mira.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mira object — is.mira","text":"logical indicating whether x object class mira","code":""},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mitml.result object — is.mitml.result","title":"Check for mitml.result object — is.mitml.result","text":"Check mitml.result object","code":""},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mitml.result object — is.mitml.result","text":"","code":"is.mitml.result(x)"},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mitml.result object — is.mitml.result","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mitml.result object — is.mitml.result","text":"logical indicating whether x object class mitml.result","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":null,"dir":"Reference","previous_headings":"","what":"Leiden 85+ study — leiden85","title":"Leiden 85+ study — leiden85","text":"Subset data Leiden 85+ study","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Leiden 85+ study — leiden85","text":"leiden85 data frame 956 rows 336 columns.","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Leiden 85+ study — leiden85","text":"Lagaay, . M., van der Meij, J. C., Hijmans, W. (1992). Validation medical history taking part population based survey subjects aged 85 . Brit. Med. J., 304(6834), 1091-1092. Izaks, G. J., van Houwelingen, H. C., Schreuder, G. M., Ligthart, G. J. (1997). association human leucocyte antigens (HLA) mortality community residents aged 85 older. Journal American Geriatrics Society, 45(1), 56-60. Boshuizen, H. C., Izaks, G. J., van Buuren, S., Ligthart, G. J. (1998). Blood pressure mortality elderly people aged 85 older: Community based study. Brit. Med. J., 316(7147), 1780-1784. Van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Leiden 85+ study — leiden85","text":"data set concerns subset 956 members old (85+) cohort Leiden. Multiple imputation data set described Boshuizen et al (1998), Van Buuren et al (1999) Van Buuren (2012), chapter 7. data set available part mice.","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear regression for mids object — lm.mids","title":"Linear regression for mids object — lm.mids","text":"Applies lm() multiply imputed data set","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear regression for mids object — lm.mids","text":"","code":"lm.mids(formula, data, ...)"},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear regression for mids object — lm.mids","text":"formula formula object, response left ~ operator, terms, separated + operators, right. See documentation lm formula details. data object type 'mids', stands 'multiply imputed data set', typically created call function mice(). ... Additional parameters passed lm","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear regression for mids object — lm.mids","text":"objects class mira, stands 'multiply imputed repeated analysis'. object contains data$m distinct lm.objects, plus descriptive information.","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear regression for mids object — lm.mids","text":"function included backward compatibility V1.0. function superseded .mids.","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear regression for mids object — lm.mids","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Linear regression for mids object — lm.mids","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear regression for mids object — lm.mids","text":"","code":"imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl fit <- lm.mids(bmi ~ hyp + chl, data = imp) #> Warning: Use with(imp, lm(yourmodel). fit #> call : #> lm.mids(formula = bmi ~ hyp + chl, data = imp) #> #> call1 : #> mice(data = nhanes) #> #> nmis : #> age bmi hyp chl #> 0 9 8 10 #> #> analyses : #> [[1]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 21.97200 -2.10751 0.03717 #> #> #> [[2]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 22.39103 -2.07716 0.03741 #> #> #> [[3]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 22.14878 -0.20111 0.02421 #> #> #> [[4]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 23.21196 -2.15281 0.02989 #> #> #> [[5]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 20.86029 -3.49178 0.05265 #> #> #>"},{"path":"https://amices.org/mice/reference/mads-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputed data set (mads) — mads-class","title":"Multivariate amputed data set (mads) — mads-class","text":"mads object contains amputed data set. mads object generated ampute function. mads class objects methods following generic functions: print, summary, bwplot xyplot.","code":""},{"path":"https://amices.org/mice/reference/mads-class.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multivariate amputed data set (mads) — mads-class","text":"Many functions mice package use S4 class definitions, instead rely S3 list equivalent oldClass(obj) <- \"mads\".","code":""},{"path":"https://amices.org/mice/reference/mads-class.html","id":"contents","dir":"Reference","previous_headings":"","what":"Contents","title":"Multivariate amputed data set (mads) — mads-class","text":"call: function call. prop: Proportion cases missing values. Note: even proportion entered proportion missing cells (bycases == TRUE), object contains proportion missing cases. patterns: data frame size #patterns #variables 0 indicates variable missing values 1 indicates variable remains complete. freq: vector length #patterns containing relative frequency patterns occur. example, vector c(0.4, 0.4, 0.2), means cases missing values, 40 percent candidate pattern 1, 40 percent pattern 2 20 percent pattern 3. vector sums 1. mech: string specifying missingness mechanism, either \"MCAR\", \"MAR\" \"MNAR\". weights: data frame size #patterns #variables. contains weights used calculate weighted sum scores. weights may differ patterns variables. cont: Logical, whether probabilities based continuous logit functions discrete odds distributions. type: vector strings containing type missingness pattern. Either \"LEFT\", \"MID\", \"TAIL\" \"RIGHT\". first type refers first pattern, second type second pattern, etc. odds: matrix #patterns defines #rows. row contains odds missing corresponding pattern. amount odds values defines many quantiles sum scores divided. values relative probabilities: quantile odds value 4 probability missing four times higher quantile odds 1. #quantiles may differ patterns, NA used cells remaining empty. amp: data frame containing input data NAs amputed values. cand: vector contains pattern number case. value 1 #patterns given. example, case value 2 candidate missing data pattern 2. scores: list containing vectors weighted sum scores candidates. first vector refers candidates first pattern, second vector refers candidates second pattern, etc. length vectors differ number candidates different pattern. data: complete data set entered ampute.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mads-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputed data set (mads) — mads-class","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a blocks argument — make.blocks","title":"Creates a blocks argument — make.blocks","text":"helper function generates list type needed blocks argument [=mice]{mice} function.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a blocks argument — make.blocks","text":"","code":"make.blocks( data, partition = c(\"scatter\", \"collect\", \"void\"), calltype = \"pred\" )"},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a blocks argument — make.blocks","text":"data data.frame, character vector variable names, list variable names. partition character vector length 1 used assign variables blocks data data.frame. Value \"scatter\" (default) assign column block. Value \"collect\" assigns variables one block, whereas \"void\" produces empty list. calltype character vector length(block) elements indicates imputation model specified. calltype = \"pred\" (default), underlying imputation model called means type argument. type argument block h equivalent row h predictorMatrix. alternative calltype = \"formula\". pass formulas[[h]] underlying imputation function block h, together current data. calltype block set automatically initialization. choice possible, calltype \"formula\" preferred \"pred\" since flexible extendable. However, precisely happens depends also capabilities imputation function called.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a blocks argument — make.blocks","text":"named list character vectors variables names.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates a blocks argument — make.blocks","text":"Choices \"scatter\" \"collect\" represent two extreme scenarios assigning variables imputation blocks. Use \"scatter\" create imputation model based fully conditionally specification (FCS). Use \"collect\" gather variables imputed joint model (JM). Scenario's -two extremes represent hybrid imputation models combine FCS JM. variable listed imputed. Specification \"void\" represents extreme scenario skips imputation variables. variable may member multiple blocks. variable re-imputed block, final imputations variable come last block executed. scenario may useful complete background factors appear multiple imputation blocks. variable may appear multiple times within given block. univariate imputation model applied block, variable re-imputed time appears block.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a blocks argument — make.blocks","text":"","code":"make.blocks(nhanes) #> $age #> [1] \"age\" #> #> $bmi #> [1] \"bmi\" #> #> $hyp #> [1] \"hyp\" #> #> $chl #> [1] \"chl\" #> #> attr(,\"calltype\") #> age bmi hyp chl #> \"pred\" \"pred\" \"pred\" \"pred\" make.blocks(c(\"age\", \"sex\", \"edu\")) #> $age #> [1] \"age\" #> #> $sex #> [1] \"sex\" #> #> $edu #> [1] \"edu\" #> #> attr(,\"calltype\") #> age sex edu #> \"pred\" \"pred\" \"pred\""},{"path":"https://amices.org/mice/reference/make.blots.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a blots argument — make.blots","title":"Creates a blots argument — make.blots","text":"helper function creates valid blots object. blots object argument mice function. name blots contraction blocks-dots. blots, user can specify additional arguments specifically passed lowest level imputation function.","code":""},{"path":"https://amices.org/mice/reference/make.blots.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a blots argument — make.blots","text":"","code":"make.blots(data, blocks = make.blocks(data))"},{"path":"https://amices.org/mice/reference/make.blots.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a blots argument — make.blots","text":"data data.frame source data blocks optional specification blocks variables rows. default assigns variable block.","code":""},{"path":"https://amices.org/mice/reference/make.blots.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a blots argument — make.blots","text":"matrix","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.blots.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a blots argument — make.blots","text":"","code":"make.predictorMatrix(nhanes) #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 make.blots(nhanes, blocks = name.blocks(c(\"age\", \"hyp\"), \"xxx\")) #> $age #> list() #> #> $hyp #> list() #>"},{"path":"https://amices.org/mice/reference/make.formulas.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a formulas argument — make.formulas","title":"Creates a formulas argument — make.formulas","text":"helper function creates valid formulas object. formulas object argument mice function. list formula's specifies target variables predictors means standard ~ operator.","code":""},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a formulas argument — make.formulas","text":"","code":"make.formulas(data, blocks = make.blocks(data), predictorMatrix = NULL)"},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a formulas argument — make.formulas","text":"data data.frame source data blocks optional specification blocks variables rows. default assigns variable block. predictorMatrix predictorMatrix specified user.","code":""},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a formulas argument — make.formulas","text":"list formula's.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a formulas argument — make.formulas","text":"","code":"f1 <- make.formulas(nhanes) f1 #> $age #> age ~ bmi + hyp + chl #> #> #> $bmi #> bmi ~ age + hyp + chl #> #> #> $hyp #> hyp ~ age + bmi + chl #> #> #> $chl #> chl ~ age + bmi + hyp #> #> f2 <- make.formulas(nhanes, blocks = make.blocks(nhanes, \"collect\")) f2 #> $collect #> age + bmi + hyp + chl ~ `0` #> #> # for editing, it may be easier to work with the character vector c1 <- as.character(f1) c1 #> [1] \"age ~ bmi + hyp + chl\" \"bmi ~ age + hyp + chl\" \"hyp ~ age + bmi + chl\" #> [4] \"chl ~ age + bmi + hyp\" # fold it back into a formula list f3 <- name.formulas(lapply(c1, as.formula)) f3 #> $age #> age ~ bmi + hyp + chl #> #> #> $bmi #> bmi ~ age + hyp + chl #> #> #> $hyp #> hyp ~ age + bmi + chl #> #> #> $chl #> chl ~ age + bmi + hyp #> #>"},{"path":"https://amices.org/mice/reference/make.method.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a method argument — make.method","title":"Creates a method argument — make.method","text":"helper function creates valid method vector. method vector argument mice function specifies method block.","code":""},{"path":"https://amices.org/mice/reference/make.method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a method argument — make.method","text":"","code":"make.method( data, where = make.where(data), blocks = make.blocks(data), defaultMethod = c(\"pmm\", \"logreg\", \"polyreg\", \"polr\") )"},{"path":"https://amices.org/mice/reference/make.method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a method argument — make.method","text":"data data frame matrix containing incomplete data. Missing values coded NA. data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. defaultMethod vector length 4 containing default imputation methods 1) numeric data, 2) factor data 2 levels, 3) factor data > 2 unordered levels, 4) factor data > 2 ordered levels. default, method uses pmm, predictive mean matching (numeric data) logreg, logistic regression imputation (binary data, factor 2 levels) polyreg, polytomous regression imputation unordered categorical data (factor > 2 levels) polr, proportional odds model (ordered, > 2 levels).","code":""},{"path":"https://amices.org/mice/reference/make.method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a method argument — make.method","text":"Vector length(blocks) element method names","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a method argument — make.method","text":"","code":"make.method(nhanes2) #> age bmi hyp chl #> \"\" \"pmm\" \"logreg\" \"pmm\""},{"path":"https://amices.org/mice/reference/make.post.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a post argument — make.post","title":"Creates a post argument — make.post","text":"helper function creates valid post vector. post vector argument mice function specifies post-processing variable iteration imputation.","code":""},{"path":"https://amices.org/mice/reference/make.post.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a post argument — make.post","text":"","code":"make.post(data)"},{"path":"https://amices.org/mice/reference/make.post.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a post argument — make.post","text":"data data frame matrix containing incomplete data. Missing values coded NA.","code":""},{"path":"https://amices.org/mice/reference/make.post.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a post argument — make.post","text":"Character vector ncol(data) element","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.post.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a post argument — make.post","text":"","code":"make.post(nhanes2) #> age bmi hyp chl #> \"\" \"\" \"\" \"\""},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a predictorMatrix argument — make.predictorMatrix","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"helper function creates valid predictMatrix. predictorMatrix argument mice function. specifies target variable block rows, predictor variables columns. entry 0 means column variable used impute row variable block. nonzero value indicates used.","code":""},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"","code":"make.predictorMatrix(data, blocks = make.blocks(data), predictorMatrix = NULL)"},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"data data.frame source data blocks optional specification blocks variables rows. default assigns variable block. predictorMatrix predictor matrix rows names copied output predictor matrix.","code":""},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"matrix","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"","code":"make.predictorMatrix(nhanes) #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 make.predictorMatrix(nhanes, blocks = make.blocks(nhanes, \"collect\")) #> age bmi hyp chl #> collect 1 1 1 1"},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a visitSequence argument — make.visitSequence","title":"Creates a visitSequence argument — make.visitSequence","text":"helper function creates valid visitSequence. visitSequence argument mice function specifies sequence blocks imputed.","code":""},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a visitSequence argument — make.visitSequence","text":"","code":"make.visitSequence(data = NULL, blocks = NULL)"},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a visitSequence argument — make.visitSequence","text":"data data frame matrix containing incomplete data. Missing values coded NA. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited.","code":""},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a visitSequence argument — make.visitSequence","text":"Vector containing block names","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a visitSequence argument — make.visitSequence","text":"","code":"make.visitSequence(nhanes) #> [1] \"age\" \"bmi\" \"hyp\" \"chl\""},{"path":"https://amices.org/mice/reference/make.where.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a where argument — make.where","title":"Creates a where argument — make.where","text":"helper function creates valid matrix. matrix argument mice function. size data specifies values imputed (TRUE) (FALSE).","code":""},{"path":"https://amices.org/mice/reference/make.where.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a where argument — make.where","text":"","code":"make.where(data, keyword = c(\"missing\", \"all\", \"none\", \"observed\"))"},{"path":"https://amices.org/mice/reference/make.where.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a where argument — make.where","text":"data data.frame source data keyword optional keyword, one \"missing\" (missing values imputed), \"observed\" (observed values imputed), \"\" \"none\". default keyword = \"missing\"","code":""},{"path":"https://amices.org/mice/reference/make.where.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a where argument — make.where","text":"matrix logical","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.where.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a where argument — make.where","text":"","code":"head(make.where(nhanes), 3) #> age bmi hyp chl #> 1 FALSE TRUE TRUE TRUE #> 2 FALSE FALSE FALSE FALSE #> 3 FALSE TRUE FALSE FALSE # create & analyse synthetic data where <- make.where(nhanes2, \"all\") imp <- mice(nhanes2, m = 10, where = where, print = FALSE, seed = 123 ) fit <- with(imp, lm(chl ~ bmi + age + hyp)) summary(pool.syn(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 131.574797 63.262279 2.0798302 970.66355 0.03780306 #> 2 bmi 1.774018 2.298282 0.7718887 795.99667 0.44040943 #> 3 age40-59 18.895593 20.771314 0.9096966 1513.73872 0.36312737 #> 4 age60-99 29.884250 20.936150 1.4273995 655.88704 0.15394068 #> 5 hypyes 8.784214 21.349328 0.4114515 91.38507 0.68170484"},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":null,"dir":"Reference","previous_headings":"","what":"Mammal sleep data — mammalsleep","title":"Mammal sleep data — mammalsleep","text":"Dataset Allison Cicchetti (1976) 62 mammal species interrelationship sleep, ecological, constitutional variables. dataset contains missing values five variables.","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Mammal sleep data — mammalsleep","text":"mammalsleep data frame 62 rows 11 columns: species Species animal bw Body weight (kg) brw Brain weight (g) sws Slow wave (\"nondreaming\") sleep (hrs/day) ps Paradoxical (\"dreaming\") sleep (hrs/day) ts Total sleep (hrs/day) (sum slow wave paradoxical sleep) mls Maximum life span (years) gt Gestation time (days) pi Predation index (1-5), 1 = least likely preyed upon sei Sleep exposure index (1-5), 1 = least exposed (e.g. animal sleeps well-protected den), 5 = exposed odi Overall danger index (1-5) based two indices information, 1 = least danger (animals), 5 = danger (animals)","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Mammal sleep data — mammalsleep","text":"Allison, T., Cicchetti, D.V. (1976). Sleep Mammals: Ecological Constitutional Correlates. Science, 194(4266), 732-734.","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mammal sleep data — mammalsleep","text":"Allison Cicchetti (1976) investigated interrelationship sleep, ecological, constitutional variables. assessed variables 39 mammalian species. authors concluded slow-wave sleep negatively associated factor related body size. suggests large amounts sleep phase disadvantageous large species. Also, paradoxical sleep (REM sleep) associated factor related predatory danger, suggesting large amounts sleep phase disadvantageous prey species.","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mammal sleep data — mammalsleep","text":"","code":"sleep <- data(mammalsleep)"},{"path":"https://amices.org/mice/reference/matchindex.html","id":null,"dir":"Reference","previous_headings":"","what":"Find index of matched donor units — matchindex","title":"Find index of matched donor units — matchindex","text":"Find index matched donor units","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find index of matched donor units — matchindex","text":"","code":"matchindex(d, t, k = 5L)"},{"path":"https://amices.org/mice/reference/matchindex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find index of matched donor units — matchindex","text":"d Numeric vector values donor cases. t Numeric vector values target cases. k Integer, number unique donors random draw made. k = 1 function returns index d corresponding closest unit. multiple imputation, advice set values range k = 5 k = 10.","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find index of matched donor units — matchindex","text":"integer vector length(t) elements. element index array d.","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find index of matched donor units — matchindex","text":"element t, method finds k nearest neighbours d, randomly draws one neighbours, returns position vector d. Fast predictive mean matching algorithm seven steps: 1. Shuffle records remove effects ties 2. Obtain sorting order shuffled data 3. Calculate index input data sort 4. Pre-sample vector h values 1 k n0 elements t: 5. find two adjacent neighbours 6. find h_i'th nearest neighbour 7. store index neighbour Return vector n0 positions d. may use function perform predictive mean matching given predictive model. , specify d t predictions model. Suppose y contains observed outcomes donor cases (sequence d), y[matchindex(d, t)] returns one matched outcome every target case. See https://github.com/amices/mice/issues/236. function replacement matcher() function default mice since version 2.22 (June 2014).","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find index of matched donor units — matchindex","text":"Stef van Buuren, Nasinski Maciej, Alexander Robitzsch","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find index of matched donor units — matchindex","text":"","code":"set.seed(1) # Inputs need not be sorted d <- c(-5, 5, 0, 10, 12) t <- c(-6, -4, 0, 2, 4, -2, 6) # Index (in vector a) of closest match idx <- matchindex(d, t, 1) idx #> [1] 1 1 3 3 2 3 2 # To check: show values of closest match # Random draw among indices of the 5 closest predictors matchindex(d, t) #> [1] 3 1 5 5 2 3 1 # An example train <- mtcars[1:20, ] test <- mtcars[21:32, ] fit <- lm(mpg ~ disp + cyl, data = train) d <- fitted.values(fit) t <- predict(fit, newdata = test) # note: not using mpg idx <- matchindex(d, t) # Borrow values from train to produce 12 synthetic values for mpg in test. # Synthetic values are plausible values that could have been observed if # they had been measured. train$mpg[idx] #> [1] 22.8 15.2 16.4 18.7 14.3 30.4 22.8 22.8 18.7 21.0 17.3 24.4 # Exercise: Create a distribution of 1000 plausible values for each of the # twelve mpg entries in test, and count how many times the true value # (which we know here) is located within the inter-quartile range of each # distribution. Is your count anywhere close to 500? Why? Why not?"},{"path":"https://amices.org/mice/reference/md.pairs.html","id":null,"dir":"Reference","previous_headings":"","what":"Missing data pattern by variable pairs — md.pairs","title":"Missing data pattern by variable pairs — md.pairs","text":"Number observations per variable pair.","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Missing data pattern by variable pairs — md.pairs","text":"","code":"md.pairs(data)"},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Missing data pattern by variable pairs — md.pairs","text":"data data frame matrix containing incomplete data. Missing values coded NA.","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Missing data pattern by variable pairs — md.pairs","text":"list four components named rr, rm, mr mm. component square numerical matrix containing number observations within four missing data pattern.","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Missing data pattern by variable pairs — md.pairs","text":"four components output value following interpretation: list('rr') response-response, variables observed list('rm') response-missing, row observed, column missing list('mr') missing -response, row missing, column observed list('mm') missing -missing, variables missing","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Missing data pattern by variable pairs — md.pairs","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Missing data pattern by variable pairs — md.pairs","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2009","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Missing data pattern by variable pairs — md.pairs","text":"","code":"pat <- md.pairs(nhanes) pat #> $rr #> age bmi hyp chl #> age 25 16 17 15 #> bmi 16 16 16 13 #> hyp 17 16 17 14 #> chl 15 13 14 15 #> #> $rm #> age bmi hyp chl #> age 0 9 8 10 #> bmi 0 0 0 3 #> hyp 0 1 0 3 #> chl 0 2 1 0 #> #> $mr #> age bmi hyp chl #> age 0 0 0 0 #> bmi 9 0 1 2 #> hyp 8 0 0 1 #> chl 10 3 3 0 #> #> $mm #> age bmi hyp chl #> age 0 0 0 0 #> bmi 0 9 8 7 #> hyp 0 8 8 7 #> chl 0 7 7 10 #> # show that these four matrices decompose the total sample size # for each pair pat$rr + pat$rm + pat$mr + pat$mm #> age bmi hyp chl #> age 25 25 25 25 #> bmi 25 25 25 25 #> hyp 25 25 25 25 #> chl 25 25 25 25 # percentage of usable cases to impute row variable from column variable round(100 * pat$mr / (pat$mr + pat$mm)) #> age bmi hyp chl #> age NaN NaN NaN NaN #> bmi 100 0 11 22 #> hyp 100 0 0 12 #> chl 100 30 30 0"},{"path":"https://amices.org/mice/reference/md.pattern.html","id":null,"dir":"Reference","previous_headings":"","what":"Missing data pattern — md.pattern","title":"Missing data pattern — md.pattern","text":"Display missing-data patterns.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Missing data pattern — md.pattern","text":"","code":"md.pattern(x, plot = TRUE, rotate.names = FALSE)"},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Missing data pattern — md.pattern","text":"x data frame matrix containing incomplete data. Missing values coded NA's. plot missing data pattern made plot. Default `plot = TRUE`. rotate.names Whether variable names plot placed horizontally vertically. Default `rotate.names = FALSE`.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Missing data pattern — md.pattern","text":"matrix ncol(x)+1 columns, row corresponds missing data pattern (1=observed, 0=missing). Rows columns sorted increasing amounts missing information. last column row contain row column counts, respectively.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Missing data pattern — md.pattern","text":"function useful investigating structure missing observations data. specific case, missing data pattern (nearly) monotone. Monotonicity can used simplify imputation model. See Schafer (1997) details. Also, missing pattern suggest variables potentially useful imputation missing entries.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Missing data pattern — md.pattern","text":"Schafer, J.L. (1997), Analysis multivariate incomplete data. London: Chapman&Hall. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Missing data pattern — md.pattern","text":"Gerko Vink, 2018, based earlier version function Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Missing data pattern — md.pattern","text":"","code":"md.pattern(nhanes) #> age hyp bmi chl #> 13 1 1 1 1 0 #> 3 1 1 1 0 1 #> 1 1 1 0 1 1 #> 1 1 0 0 1 2 #> 7 1 0 0 0 3 #> 0 8 9 10 27 # age hyp bmi chl # 13 1 1 1 1 0 # 1 1 1 0 1 1 # 3 1 1 1 0 1 # 1 1 0 0 1 2 # 7 1 0 0 0 3 # 0 8 9 10 27"},{"path":"https://amices.org/mice/reference/mdc.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphical parameter for missing data plots — mdc","title":"Graphical parameter for missing data plots — mdc","text":"mdc returns colors used distinguish observed, missing combined data plotting. mice.theme return partial list named objects can used theme stripplot, bwplot, densityplot xyplot.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphical parameter for missing data plots — mdc","text":"","code":"mdc( r = \"observed\", s = \"symbol\", transparent = TRUE, cso = grDevices::hcl(240, 100, 40, 0.7), csi = grDevices::hcl(0, 100, 40, 0.7), csc = \"gray50\", clo = grDevices::hcl(240, 100, 40, 0.8), cli = grDevices::hcl(0, 100, 40, 0.8), clc = \"gray50\" )"},{"path":"https://amices.org/mice/reference/mdc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphical parameter for missing data plots — mdc","text":"r numerical character vector. numbers 1-6 request colors follows: 1=cso, 2=csi, 3=csc, 4=clo, 5=cli 6=clc. Alternatively, r may contain strings ' observed', 'missing', '', abbreviations thereof. s character vector containing strings 'symbol' ' line', abbreviations thereof. transparent logical indicating whether alpha-transparency allowed. default TRUE. cso symbol color observed data. default transparent blue. csi symbol color missing imputed data. default transparent red. csc symbol color combined observed imputed data. default grey color. clo line color observed data. default slightly darker transparent blue. cli line color missing imputed data. default slightly darker transparent red. clc line color combined observed imputed data. default grey color.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graphical parameter for missing data plots — mdc","text":"mdc() returns vector containing color definitions. length output vector calculate length r s. Elements input vectors repeated needed.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graphical parameter for missing data plots — mdc","text":"function eases consistent use colors plots. default follows Abayomi convention, uses blue observed data, red missing imputed data, black combined data.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graphical parameter for missing data plots — mdc","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mdc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graphical parameter for missing data plots — mdc","text":"Stef van Buuren, sept 2012.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graphical parameter for missing data plots — mdc","text":"","code":"# all six colors mdc(1:6) #> [1] \"#006CC2B3\" \"#B61A51B3\" \"gray50\" \"#006CC2CC\" \"#B61A51CC\" \"gray50\" # lines color for observed and missing data mdc(c(\"obs\", \"mis\"), \"lin\") #> [1] \"#006CC2CC\" \"#B61A51CC\""},{"path":"https://amices.org/mice/reference/mice.html","id":null,"dir":"Reference","previous_headings":"","what":"mice: Multivariate Imputation by Chained Equations — mice","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"mice package implements method deal missing data. package creates multiple imputations (replacement values) multivariate missing data. method based Fully Conditional Specification, incomplete variable imputed separate model. MICE algorithm can impute mixes continuous, binary, unordered categorical ordered categorical data. addition, MICE can impute continuous two-level data, maintain consistency imputations means passive imputation. Many diagnostic plots implemented inspect quality imputations. Generates Multivariate Imputations Chained Equations (MICE)","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"","code":"mice( data, m = 5, method = NULL, predictorMatrix, ignore = NULL, where = NULL, blocks, visitSequence = NULL, formulas, blots = NULL, post = NULL, defaultMethod = c(\"pmm\", \"logreg\", \"polyreg\", \"polr\"), maxit = 5, printFlag = TRUE, seed = NA, data.init = NULL, ... )"},{"path":"https://amices.org/mice/reference/mice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"data data frame matrix containing incomplete data. Missing values coded NA. m Number multiple imputations. default m=5. method Can either single string, vector strings length length(blocks), specifying imputation method used column data. specified single string, method used blocks. default imputation method (argument specified) depends measurement level target column, regulated defaultMethod argument. Columns need imputed empty method \"\". See details. predictorMatrix numeric matrix length(blocks) rows ncol(data) columns, containing 0/1 data specifying set predictors used target column. row corresponds variable block, .e., set variables imputed. value 1 means column variable used predictor target block (rows). default, predictorMatrix square matrix ncol(data) rows columns 1's, except diagonal. Note: two-level imputation models (\"2l\" names) codes (e.g, 2 -2) also allowed. ignore logical vector nrow(data) elements indicating rows ignored creating imputation model. default NULL includes rows observed value variable imputed. Rows ignore set TRUE influence parameters imputation model, still imputed. may use ignore argument split data training set (imputation model built) test set (influence imputation model estimates). Note: Multivariate imputation methods, like mice.impute.jomoImpute() mice.impute.panImpute(), honour ignore argument. data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. visitSequence vector block names arbitrary length, specifying sequence blocks imputed one iteration Gibbs sampler. block collection variables. variables members block imputed block visited. variable member multiple blocks re-imputed within iteration. default visitSequence = \"roman\" visits blocks (left right) order appear blocks. One may also use one following keywords: \"arabic\" (right left), \"monotone\" (ordered low high proportion missing data) \"revmonotone\" (reverse monotone). Special case: specify visitSequence = \"monotone\" maxit = 1, procedure edit predictorMatrix conform monotone pattern. Realize convergence one iteration guaranteed missing data pattern actually monotone. procedure check . formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. blots named list alist's can used pass arguments lower level imputation function. entries element blots[[blockname]] passed function called block blockname. post vector strings length ncol(data) specifying expressions strings. string parsed executed within sampler() function post-process imputed values iterations. default vector empty strings, indicating post-processing. Multivariate (block) imputation methods ignore post parameter. defaultMethod vector length 4 containing default imputation methods 1) numeric data, 2) factor data 2 levels, 3) factor data > 2 unordered levels, 4) factor data > 2 ordered levels. default, method uses pmm, predictive mean matching (numeric data) logreg, logistic regression imputation (binary data, factor 2 levels) polyreg, polytomous regression imputation unordered categorical data (factor > 2 levels) polr, proportional odds model (ordered, > 2 levels). maxit scalar giving number iterations. default 5. printFlag TRUE, mice print history console. Use print=FALSE silent computation. seed integer used argument set.seed() offsetting random number generator. Default leave random number generator alone. data.init data frame size type data, without missing data, used initialize imputations start iterative process. default NULL implies starting imputation created simple random draw data. Note specification data.init start m Gibbs sampling streams imputation. ... Named arguments passed univariate imputation functions.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"Returns S3 object class mids (multiply imputed data set)","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"mice package contains functions Inspect missing data pattern Impute missing data m times, resulting m completed data sets Diagnose quality imputed values Analyze completed data set Pool results repeated analyses Store export imputed data various formats Generate simulated incomplete data Incorporate custom imputation methods Generates multiple imputations incomplete multivariate data Gibbs sampling. Missing data can occur anywhere data. algorithm imputes incomplete column (target column) generating 'plausible' synthetic values given columns data. incomplete column must act target column, specific set predictors. default set predictors given target consists columns data. predictors incomplete , recently generated imputations used complete predictors prior imputation target column. separate univariate imputation model can specified column. default imputation method depends measurement level target column. addition , several methods provided. can also write imputation functions, call within algorithm. data may contain categorical variables used regressions variables. algorithm creates dummy variables categories variables, imputes corresponding categorical variable. Built-univariate imputation methods : corresponding functions coded mice library names mice.impute.method, method string name univariate imputation method name, example norm. method argument specifies methods used. j'th column, mice() calls first occurrence paste('mice.impute.', method[j], sep = '') search path. mechanism allows uses write customized imputation function, mice.impute.myfunc. call columns specify method='myfunc'. call , say, column 2 specify method=c('norm','myfunc','logreg',...{}). Skipping imputation: user may skip imputation column setting entry empty method: \"\". complete columns without missing data mice automatically set empty method. Setting t empty method produce imputations column, missing cells remain NA. column contains NA's used predictor imputation model column B, mice produces imputations rows B missing. imputed data B may thus contain NA's. remedy remove column imputation model columns data. can done setting entire column variable predictorMatrix equal zero. Passive imputation: mice() supports special built-method, called passive imputation. method can used ensure data transform always depends recently generated imputations. cases, imputation model may need transformed data addition original data (e.g. log, quadratic, recodes, interaction, sum scores, ). Passive imputation maintains consistency among different transformations data. Passive imputation invoked ~ specified first character string specifies univariate method. mice() interprets entire string, including ~ character, formula argument call model.frame(formula, data[!r[,j],]). provides simple mechanism specifying deterministic dependencies among columns. example, suppose missing entries variables data$height data$weight imputed. body mass index (BMI) can calculated within mice specifying string '~(weight/height^2)' univariate imputation method target column data$bmi. Note ~ mechanism works entries missing values target column. make sure combined observed imputed parts target column make sense. easy way create consistency coding entries target NA, large data sets, inefficient. Note may also need adapt default predictorMatrix evade linear dependencies among predictors cause errors like Error solve.default() Error: system exactly singular. Though strictly needed, often useful specify visitSequence column imputed ~ mechanism visited time one predictors visited. way, deterministic relation columns always synchronized. new argument ls.meth can parsed lower level .norm.draw specify method generating least squares estimates subsequently derived estimates. Argument ls.meth takes one three inputs: \"qr\" QR-decomposition, \"svd\" singular value decomposition \"ridge\" ridge regression. ls.meth defaults ls.meth = \"qr\". Auxiliary predictors formulas specification: given block, formulas specification takes precedence corresponding row predictMatrix argument. precedence , however, restricted subset variables specified terms block formula. variables specified formulas imputed according predictMatrix specification. Variables non-zero type values predictMatrix added main effects formulas, act supplementary covariates imputation model. possible turn behavior specifying argument auxiliary = FALSE.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"main functions :","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"vignettes","dir":"Reference","previous_headings":"","what":"Vignettes","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"detailed series six online vignettes walk solving realistic inference problems mice. suggest going vignettes following order Ad hoc methods MICE algorithm Convergence pooling Inspecting observed data missingness related Passive imputation post-processing Imputing multilevel data Sensitivity analysis mice Van Buuren, S. (2018). Boca Raton, FL.: Chapman & Hall/CRC Press. book Flexible Imputation Missing Data. Second Edition. contains lot example code.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"methodology","dir":"Reference","previous_headings":"","what":"Methodology","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"mice software published Journal Statistical Software (Van Buuren Groothuis-Oudshoorn, 2011). doi:10.18637/jss.v045.i03 . first application method concerned missing blood pressure data (Van Buuren et. al., 1999). term Fully Conditional Specification introduced 2006 describe general class methods specify imputations model multivariate data set conditional distributions (Van Buuren et. al., 2006). details mixes variables applications can found book Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"enhanced-linear-algebra","dir":"Reference","previous_headings":"","what":"Enhanced linear algebra","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"Updating BLAS can improve speed R, sometime considerably. details depend operating system. See discussion \"R Installation Administration\" guide information.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064. van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1–67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064. Van Buuren, S. (2007) Multiple imputation discrete continuous data fully conditional specification. Statistical Methods Medical Research, 16, 3, 219–242. Van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"Maintainer: Stef van Buuren stef.vanbuuren@tno.nl Authors: Karin Groothuis-Oudshoorn c.g.m.oudshoorn@utwente.nl contributors: Gerko Vink g.vink@uu.nl [contributor] Rianne Schouten R.M.Schouten@uu.nl [contributor] Alexander Robitzsch robitzsch@ipn.uni-kiel.de [contributor] Patrick Rockenschaub rockenschaub.patrick@gmail.com [contributor] Lisa Doove lisa.doove@ppw.kuleuven.[contributor] Shahab Jolani s.jolani@maastrichtuniversity.nl [contributor] Margarita Moreno-Betancur margarita.moreno@mcri.edu.au [contributor] Ian White ian.white@ucl.ac.uk [contributor] Philipp Gaffert philipp.gaffert@gfk.com [contributor] Florian Meinfelder florian.meinfelder@uni-bamberg.de [contributor] Bernie Gray bfgray3@gmail.com [contributor] Vincent Arel-Bundock vincent.arel-bundock@umontreal.ca [contributor] Mingyang Cai m.cai@uu.nl [contributor] Thom Volker t.b.volker@uu.nl [contributor] Edoardo Costantini e.costantini@tilburguniversity.edu [contributor] Caspar van Lissa c.j.vanlissa@uu.nl [contributor] Hanne Oberman h..oberman@uu.nl [contributor] Stephen Wade stephematician@gmail.com [contributor] Stef van Buuren stef.vanbuuren@tno.nl, Karin Groothuis-Oudshoorn c.g.m.oudshoorn@utwente.nl, 2000-2010, contributions Alexander Robitzsch, Gerko Vink, Shahab Jolani, Roel de Jong, Jason Turner, Lisa Doove, John Fox, Frank E. Harrell, Peter Malewski.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"","code":"# do default multiple imputation on a numeric matrix imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl imp #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"pmm\" \"pmm\" \"pmm\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 # list the actual imputations for BMI imp$imp$bmi #> 1 2 3 4 5 #> 1 29.6 25.5 22.0 30.1 25.5 #> 3 28.7 27.2 29.6 26.3 28.7 #> 4 22.5 21.7 22.5 20.4 25.5 #> 6 25.5 24.9 25.5 25.5 22.5 #> 10 20.4 22.5 28.7 21.7 30.1 #> 11 27.5 27.2 35.3 30.1 27.4 #> 12 27.5 27.2 27.5 22.5 27.4 #> 16 29.6 33.2 28.7 22.0 28.7 #> 21 20.4 22.7 30.1 30.1 33.2 # first completed data matrix complete(imp) #> age bmi hyp chl #> 1 1 29.6 1 238 #> 2 2 22.7 1 187 #> 3 1 28.7 1 187 #> 4 3 22.5 2 186 #> 5 1 20.4 1 113 #> 6 3 25.5 2 184 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 10 2 20.4 1 187 #> 11 1 27.5 1 187 #> 12 2 27.5 1 218 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 238 #> 16 1 29.6 1 238 #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 206 #> 21 1 20.4 1 187 #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 186 #> 25 2 27.4 1 186 # imputation on mixed data with a different method per column mice(nhanes2, meth = c(\"sample\", \"pmm\", \"logreg\", \"norm\")) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"pmm\" \"logreg\" \"norm\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 if (FALSE) { # \\dontrun{ # example where we fit the imputation model on the train data # and apply the model to impute the test data set.seed(123) ignore <- sample(c(TRUE, FALSE), size = 25, replace = TRUE, prob = c(0.3, 0.7)) # scenario 1: train and test in the same dataset imp <- mice(nhanes2, m = 2, ignore = ignore, print = FALSE, seed = 22112) imp.test1 <- filter(imp, ignore) imp.test1$data complete(imp.test1, 1) complete(imp.test1, 2) # scenario 2: train and test in separate datasets traindata <- nhanes2[!ignore, ] testdata <- nhanes2[ignore, ] imp.train <- mice(traindata, m = 2, print = FALSE, seed = 22112) imp.test2 <- mice.mids(imp.train, newdata = testdata) complete(imp.test2, 1) complete(imp.test2, 2) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Imputes univariate systematically sporadically missing data using two-level logistic model using lme4::glmer()","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"","code":"mice.impute.2l.bin(y, ry, x, type, wy = NULL, intercept = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. Random variables identified '2'. class variable (one allowed) coded '-2'. Fixed effects indicated '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. intercept Logical determining whether intercept automatically added. ... Arguments passed glmer","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Data missing systematically measured, e.g., case combine data different sources. Data missing sporadically partially observed.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Jolani S., Debray T.P.., Koffijberg H., van Buuren S., Moons K.G.M. (2015). Imputation systematically missing predictors individual participant data meta-analysis: generalized approach using MICE. Statistics Medicine, 34:1841-1863.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Shahab Jolani, 2015; adapted mice, SvB, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"","code":"library(tidyr) library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union data(\"toenail2\") data <- tidyr::complete(toenail2, patientID, visit) %>% tidyr::fill(treatment) %>% dplyr::select(-time) %>% dplyr::mutate(patientID = as.integer(patientID)) if (FALSE) { # \\dontrun{ pred <- mice(data, print = FALSE, maxit = 0, seed = 1)$pred pred[\"outcome\", \"patientID\"] <- -2 imp <- mice(data, method = \"2l.bin\", pred = pred, maxit = 1, m = 1, seed = 1) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Imputes univariate systematically sporadically missing data using two-level normal model using lme4::lmer().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"","code":"mice.impute.2l.lmer(y, ry, x, type, wy = NULL, intercept = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. Random variables identified '2'. class variable (one allowed) coded '-2'. Fixed effects indicated '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. intercept Logical determining whether intercept automatically added. ... Arguments passed lmer","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Data missing systematically measured, e.g., case combine data different sources. Data missing sporadically partially observed. method fully Bayesian, may fix parameters variance-covariance matrix random effects estimated value cases creating draws posterior possible. procedure throws warning happens. lme4::lmer() fails, procedure prints warning \"lmer run. Simplify imputation model\" returns current imputation. happens see flat lines trace line plots. Thus, appearance flat trace lines taken additional alert problem imputation model fitting.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Jolani S. (2017) Hierarchical imputation systematically sporadically missing data: approximate Bayesian approach using chained equations. Forthcoming. Jolani S., Debray T.P.., Koffijberg H., van Buuren S., Moons K.G.M. (2015). Imputation systematically missing predictors individual participant data meta-analysis: generalized approach using MICE. Statistics Medicine, 34:1841-1863. Van Buuren, S. (2011) Multiple imputation multilevel data. Hox, J.J. Roberts, J.K. (Eds.), Handbook Advanced Multilevel Analysis, Chapter 10, pp. 173–196. Milton Park, UK: Routledge.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Shahab Jolani, 2017","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level normal model — mice.impute.2l.norm","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Imputes univariate missing data using two-level normal model","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"","code":"mice.impute.2l.norm(y, ry, x, type, wy = NULL, intercept = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. Random variables identified '2'. class variable (one allowed) coded '-2'. Random variables also include fixed effect. wy Logical vector length length(y). TRUE value indicates locations y imputations created. intercept Logical determining whether intercept automatically added. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Implements Gibbs sampler linear multilevel model heterogeneous -class variance (Kasim Raudenbush, 1998). Imputations drawn extra step algorithm. simulation work see Van Buuren (2011). random intercept automatically added mice.impute.2L.norm(). model within random intercept can specified mice(..., intercept = FALSE).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Added June 25, 2012: currently implemented algorithm handle predictors specified fixed effects (type=1). using mice.impute.2l.norm(), current advice specify predictors random effects (type=2). Warning: assumption heterogeneous variances requires every class least one observation response y.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Kasim RM, Raudenbush SW. (1998). Application Gibbs sampling nested variance components models heterogeneous within-group variance. Journal Educational Behavioral Statistics, 23(2), 93–116. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2011) Multiple imputation multilevel data. Hox, J.J. Roberts, J.K. (Eds.), Handbook Advanced Multilevel Analysis, Chapter 10, pp. 173–196. Milton Park, UK: Routledge.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Roel de Jong, 2008","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Imputes univariate missing data using two-level normal model homogeneous within group variances. Aggregated group effects (.e. group means) can automatically created included predictors two-level regression (see argument type). function needs pan package.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"","code":"mice.impute.2l.pan( y, ry, x, type, intercept = TRUE, paniter = 500, groupcenter.slope = FALSE, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"y Incomplete data vector length n ry Vector missing data pattern (FALSE=missing, TRUE=observed) x Matrix (n x p) complete covariates. type Vector length ncol(x) identifying random class variables. Random effects identified '2'. group variable (one allowed) coded '-2'. Random effects also include fixed effect. covariates X1 group means shall calculated included fixed effects choose '3'. addition effects '3', specification '4' also includes random effects X1. intercept Logical determining whether intercept automatically added. paniter Number iterations pan. Default 500. groupcenter.slope TRUE, case group means (type '3' '4') group mean centering predictors conducted imputations. Default FALSE. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"vector length nmis imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Implements Gibbs sampler linear two-level model homogeneous within group variances special case multivariate linear mixed effects model (Schafer & Yucel, 2002). two-level imputation heterogeneous within-group variances see mice.impute.2l.norm. random intercept automatically added mice.impute.2l.norm().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"function implement functionality. always produces nmis imputation, irrespective argument mice function.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Schafer J L, Yucel RM (2002). Computational strategies multivariate linear mixed-effects models missing values. Journal Computational Graphical Statistics. 11, 437-457. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"","code":"# simulate some data # two-level regression model with fixed slope # number of groups G <- 250 # number of persons n <- 20 # regression parameter beta <- .3 # intraclass correlation rho <- .30 # correlation with missing response rho.miss <- .10 # missing proportion missrate <- .50 y1 <- rep(rnorm(G, sd = sqrt(rho)), each = n) + rnorm(G * n, sd = sqrt(1 - rho)) x <- rnorm(G * n) y <- y1 + beta * x dfr0 <- dfr <- data.frame(\"group\" = rep(1:G, each = n), \"x\" = x, \"y\" = y) dfr[rho.miss * x + rnorm(G * n, sd = sqrt(1 - rho.miss)) < qnorm(missrate), \"y\"] <- NA # empty imputation in mice imp0 <- mice(as.matrix(dfr), maxit = 0) predM <- imp0$predictorMatrix impM <- imp0$method # specify predictor matrix and method predM1 <- predM predM1[\"y\", \"group\"] <- -2 predM1[\"y\", \"x\"] <- 1 # fixed x effects imputation impM1 <- impM impM1[\"y\"] <- \"2l.pan\" # multilevel imputation imp1 <- mice(as.matrix(dfr), m = 1, predictorMatrix = predM1, method = impM1, maxit = 1 ) #> #> iter imp variable #> 1 1 y # multilevel analysis library(lme4) #> Loading required package: Matrix #> #> Attaching package: ‘Matrix’ #> The following objects are masked from ‘package:tidyr’: #> #> expand, pack, unpack mod <- lmer(y ~ (1 + x | group) + x, data = complete(imp1)) #> boundary (singular) fit: see help('isSingular') summary(mod) #> Linear mixed model fit by REML ['lmerMod'] #> Formula: y ~ (1 + x | group) + x #> Data: complete(imp1) #> #> REML criterion at convergence: 13126.5 #> #> Scaled residuals: #> Min 1Q Median 3Q Max #> -3.4498 -0.6620 -0.0145 0.6770 3.8518 #> #> Random effects: #> Groups Name Variance Std.Dev. Corr #> group (Intercept) 0.3460124 0.58823 #> x 0.0001001 0.01001 -1.00 #> Residual 0.7169051 0.84670 #> Number of obs: 5000, groups: group, 250 #> #> Fixed effects: #> Estimate Std. Error t value #> (Intercept) 0.03455 0.03908 0.884 #> x 0.29829 0.01247 23.922 #> #> Correlation of Fixed Effects: #> (Intr) #> x -0.045 #> optimizer (nloptwrap) convergence code: 0 (OK) #> boundary (singular) fit: see help('isSingular') #> # Examples of predictorMatrix specification # random x effects # predM1[\"y\",\"x\"] <- 2 # fixed x effects and group mean of x # predM1[\"y\",\"x\"] <- 3 # random x effects and group mean of x # predM1[\"y\",\"x\"] <- 4"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of most likely value within the class — mice.impute.2lonly.mean","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Method 2lonly.mean replicates likely value within class second-level variable. works numeric factor data. function primarily useful quick fixup data second-level variable inconsistent.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"","code":"mice.impute.2lonly.mean(y, ry, x, type, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. class variable (one allowed) coded -2. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Observed values y averaged within class, replicated missing y within class. function primarily useful repairing incomplete data constant within class, vary classes. numeric variables, mice.impute.2lonly.mean() imputes class mean y. y second-level variable, conventionally observed y identical within class, function just provides quick fix missing y filling class mean. factor variables, mice.impute.2lonly.mean() imputes frequently occuring category within class. observed y class, entries class set NA. Note may produce problems later mice imputation routines called expects predictor data complete. Methods designed imputing type second-level variables include mice.impute.2lonly.norm mice.impute.2lonly.pmm.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Boca Raton, FL.: Chapman & Hall/CRC Press.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Gerko Vink, Stef van Buuren, 2019","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"Imputes univariate missing data level 2 using Bayesian linear regression analysis. Variables level 1 aggregated level 2. group identifier level 2 must indicated type = -2 predictorMatrix.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"","code":"mice.impute.2lonly.norm(y, ry, x, type, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Group identifier must specified '-2'. Predictors must specified '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"vector length nmis imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"function allows combination mice.impute.2l.pan switching regression imputation level 1 level 2 described Yucel (2008) Gelman Hill (2007, p. 541). function checks partial missing level-2 data. Level-2 data assumed constant within cluster. one entries missing, procedure aborts error message identifies cluster incomplete level-2 data. cases, one may first fill cluster mean (mode) 2lonly.mean method remove inconsistencies.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"general approach, see miceadds::mice.impute.2lonly.function().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"Gelman, . Hill, J. (2007). Data analysis using regression multilevel/hierarchical models. Cambridge, Cambridge University Press. Yucel, RM (2008). Multiple imputation inference multivariate multilevel continuous data ignorable non-response. Philosophical Transactions Royal Society , 366, 2389-2404. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"","code":"# simulate some data # x,y ... level 1 variables # v,w ... level 2 variables G <- 250 # number of groups n <- 20 # number of persons beta <- .3 # regression coefficient rho <- .30 # residual intraclass correlation rho.miss <- .10 # correlation with missing response missrate <- .50 # missing proportion y1 <- rep(rnorm(G, sd = sqrt(rho)), each = n) + rnorm(G * n, sd = sqrt(1 - rho)) w <- rep(round(rnorm(G), 2), each = n) v <- rep(round(runif(G, 0, 3)), each = n) x <- rnorm(G * n) y <- y1 + beta * x + .2 * w + .1 * v dfr0 <- dfr <- data.frame(\"group\" = rep(1:G, each = n), \"x\" = x, \"y\" = y, \"w\" = w, \"v\" = v) dfr[rho.miss * x + rnorm(G * n, sd = sqrt(1 - rho.miss)) < qnorm(missrate), \"y\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"w\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"v\"] <- NA # empty mice imputation imp0 <- mice(as.matrix(dfr), maxit = 0) predM <- imp0$predictorMatrix impM <- imp0$method # multilevel imputation predM1 <- predM predM1[c(\"w\", \"y\", \"v\"), \"group\"] <- -2 predM1[\"y\", \"x\"] <- 1 # fixed x effects imputation impM1 <- impM impM1[c(\"y\", \"w\", \"v\")] <- c(\"2l.pan\", \"2lonly.norm\", \"2lonly.pmm\") # y ... imputation using pan # w ... imputation at level 2 using norm # v ... imputation at level 2 using pmm imp1 <- mice(as.matrix(dfr), m = 1, predictorMatrix = predM1, method = impM1, maxit = 1, paniter = 500 ) #> #> iter imp variable #> 1 1 y w v # Demonstration that 2lonly.norm aborts for partial missing data. # Better use 2lonly.mean for repair. data <- data.frame( patid = rep(1:4, each = 5), sex = rep(c(1, 2, 1, 2), each = 5), crp = c( 68, 78, 93, NA, 143, 5, 7, 9, 13, NA, 97, NA, 56, 52, 34, 22, 30, NA, NA, 45 ) ) pred <- make.predictorMatrix(data) pred[, \"patid\"] <- -2 # only missing value (out of five) for patid == 1 data[3, \"sex\"] <- NA if (FALSE) { # \\dontrun{ # The following fails because 2lonly.norm found partially missing # level-2 data # imp <- mice(data, method = c(\"\", \"2lonly.norm\", \"2l.pan\"), # predictorMatrix = pred, maxit = 1, m = 2) # > iter imp variable # > 1 1 sex crpError in .imputation.level2(y = y, ... : # > Method 2lonly.norm found the following clusters with partially missing # > level-2 data: 1 # > Method 2lonly.mean can fix such inconsistencies. } # } # In contrast, if all sex values are missing for patid == 1, it runs fine, # except on r-patched-solaris-x86. I used dontrun to evade CRAN errors. if (FALSE) { # \\dontrun{ data[1:5, \"sex\"] <- NA imp <- mice(data, method = c(\"\", \"2lonly.norm\", \"2l.pan\"), predictorMatrix = pred, maxit = 1, m = 2 ) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"Imputes univariate missing data level 2 using predictive mean matching. Variables level 1 aggregated level 2. group identifier level 2 must indicated type = -2 predictorMatrix.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"","code":"mice.impute.2lonly.pmm(y, ry, x, type, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Group identifier must specified '-2'. Predictors must specified '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"vector length nmis imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"function allows combination mice.impute.2l.pan switching regression imputation level 1 level 2 described Yucel (2008) Gelman Hill (2007, p. 541). function checks partial missing level-2 data. Level-2 data assumed constant within cluster. one entries missing, procedure aborts error message identifies cluster incomplete level-2 data. cases, one may first fill cluster mean (mode) 2lonly.mean method remove inconsistencies.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"extension categorical variables transforms dependent factor variable means .integer() function. may make sense categories approximately ordered, less pure nominal measures. general approach, see miceadds::mice.impute.2lonly.function().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"Gelman, . Hill, J. (2007). Data analysis using regression multilevel/hierarchical models. Cambridge, Cambridge University Press. Yucel, RM (2008). Multiple imputation inference multivariate multilevel continuous data ignorable non-response. Philosophical Transactions Royal Society , 366, 2389-2404. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"","code":"# simulate some data # x,y ... level 1 variables # v,w ... level 2 variables G <- 250 # number of groups n <- 20 # number of persons beta <- .3 # regression coefficient rho <- .30 # residual intraclass correlation rho.miss <- .10 # correlation with missing response missrate <- .50 # missing proportion y1 <- rep(rnorm(G, sd = sqrt(rho)), each = n) + rnorm(G * n, sd = sqrt(1 - rho)) w <- rep(round(rnorm(G), 2), each = n) v <- rep(round(runif(G, 0, 3)), each = n) x <- rnorm(G * n) y <- y1 + beta * x + .2 * w + .1 * v dfr0 <- dfr <- data.frame(\"group\" = rep(1:G, each = n), \"x\" = x, \"y\" = y, \"w\" = w, \"v\" = v) dfr[rho.miss * x + rnorm(G * n, sd = sqrt(1 - rho.miss)) < qnorm(missrate), \"y\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"w\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"v\"] <- NA # empty mice imputation imp0 <- mice(as.matrix(dfr), maxit = 0) predM <- imp0$predictorMatrix impM <- imp0$method # multilevel imputation predM1 <- predM predM1[c(\"w\", \"y\", \"v\"), \"group\"] <- -2 predM1[\"y\", \"x\"] <- 1 # fixed x effects imputation impM1 <- impM impM1[c(\"y\", \"w\", \"v\")] <- c(\"2l.pan\", \"2lonly.norm\", \"2lonly.pmm\") # turn v into a categorical variable dfr$v <- as.factor(dfr$v) levels(dfr$v) <- LETTERS[1:4] # y ... imputation using pan # w ... imputation at level 2 using norm # v ... imputation at level 2 using pmm # skip imputation on solaris is.solaris <- function() grepl(\"SunOS\", Sys.info()[\"sysname\"]) if (!is.solaris()) { imp <- mice(dfr, m = 1, predictorMatrix = predM1, method = impM1, maxit = 1, paniter = 500 ) } #> #> iter imp variable #> 1 1 y w v"},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by classification and regression trees — mice.impute.cart","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Imputes univariate missing data using classification regression trees.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by classification and regression trees — mice.impute.cart","text":"","code":"mice.impute.cart(y, ry, x, wy = NULL, minbucket = 5, cp = 1e-04, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by classification and regression trees — mice.impute.cart","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. minbucket minimum number observations terminal node used. See rpart.control details. cp Complexity parameter. split decrease overall lack fit factor cp attempted. See rpart.control details. ... named arguments passed rpart().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Vector imputed data, type y, length sum(wy) Numeric vector length sum(!ry) imputations","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Imputation y classification regression trees. procedure follows: Fit classification regression tree recursive partitioning; ymis, find terminal node end according fitted tree; Make random draw among member node, take observed value draw imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Doove, L.L., van Buuren, S., Dusseldorp, E. (2014), Recursive partitioning missing data imputation presence interaction Effects. Computational Statistics & Data Analysis, 72, 92-104. Breiman, L., Friedman, J. H., Olshen, R. ., Stone, C. J. (1984), Classification regression trees, Monterey, CA: Wadsworth & Brooks/Cole Advanced Books & Software. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Lisa Doove, Stef van Buuren, Elise Dusseldorp, 2012","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by classification and regression trees — mice.impute.cart","text":"","code":"imp <- mice(nhanes2, meth = \"cart\", minbucket = 4) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl plot(imp)"},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"function wrapper around jomoImpute function mitml package can called impute blocks variables mice. mitml::jomoImpute function provides interface jomo package multiple imputation multilevel data https://CRAN.R-project.org/package=jomo. Imputations can generated using type formula, offer different options model specification.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"","code":"mice.impute.jomoImpute( data, formula, type, m = 1, silent = TRUE, format = \"imputes\", ... )"},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"data data frame containing incomplete auxiliary variables, cluster indicator variable, variables present imputed datasets. formula formula specifying role variable imputation model. basic model constructed model.matrix, thus allowing include derived variables imputation model using (). See jomoImpute. type integer vector specifying role variable imputation model (see jomoImpute) m number imputed data sets generate. Default 10. silent (optional) Logical flag indicating console output suppressed. Default FALSE. format character vector specifying type object returned. default format = \"list\". formats currently supported. ... named arguments: n.burn, n.iter, group, prior, silent others.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"list imputations incomplete variables model, can stored imp component mids object.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"number imputations m set 1, function called m times fits within mice iteration scheme. multivariate imputation function using joint model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"Grund S, Luedtke O, Robitzsch (2016). Multiple Imputation Multilevel Missing Data: Introduction R Package pan. SAGE Open. Quartagno M Carpenter JR (2015). Multiple imputation IPD meta-analysis: allowing heterogeneity studies missing covariates. Statistics Medicine, 35:2938-2954, 2015.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"Stef van Buuren, 2018, building work Simon Grund, Alexander Robitzsch Oliver Luedtke (authors mitml package) Quartagno Carpenter (authors jomo package).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"","code":"if (FALSE) { # \\dontrun{ # Note: Requires mitml 0.3-5.7 blocks <- list(c(\"bmi\", \"chl\", \"hyp\"), \"age\") method <- c(\"jomoImpute\", \"pmm\") ini <- mice(nhanes, blocks = blocks, method = method, maxit = 0) pred <- ini$pred pred[\"B1\", \"hyp\"] <- -2 imp <- mice(nhanes, blocks = blocks, method = method, pred = pred, maxit = 1) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Imputes univariate missing binary data using lasso logistic regression bootstrap.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"","code":"mice.impute.lasso.logreg(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"method consists following steps: given y variable imputation, draw bootstrap version y* replacement observed cases y[ry], stores x* corresponding values x[ry, ]. Fit regularised (lasso) logistic regression y* outcome, x* predictors. vector regression coefficients bhat obtained. coefficients considered random draws imputation model parameters posterior distribution. coefficients shrunken 0. Compute predicted scores m.d., .e. logit-1(X bhat) Compare score random (0,1) deviate, impute. method based Direct Use Regularized Regression (DURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Imputes univariate missing normal data using lasso linear regression bootstrap.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"","code":"mice.impute.lasso.norm(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"method consists following steps: given y variable imputation, draw bootstrap version y* replacement observed cases y[ry], stores x* corresponding values x[ry, ]. Fit regularised (lasso) linear regression y* outcome, x* predictors. vector regression coefficients bhat obtained. coefficients considered random draws imputation model parameters posterior distribution. coefficients shrunken 0. Draw imputed values predictive distribution defined original (non-bootstrap) data, bhat, estimated error variance. method based Direct Use Regularized Regression (DURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Imputes univariate missing data using logistic regression following preprocessing lasso variable selection step.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"","code":"mice.impute.lasso.select.logreg(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"method consists following steps: given y variable imputation, fit linear regression lasso penalty using y[ry] dependent variable x[ry, ] predictors. coefficients shrunk 0 define active set predictors used imputation. Fit logit active set predictors, find (bhat, V(bhat)) Draw BETA N(bhat, V(bhat)) Compute predicted scores m.d., .e. logit-1(X BETA) Compare score random (0,1) deviate, impute. user can specify predictorMatrix mice call define predictors provided univariate imputation method. lasso regularization select, among variables indicated user, ones important imputation given iteration. Therefore, users may force exclusion predictor given imputation model speficing 0 entry. However, non-zero entry guarantee variable used, decision ultimately made lasso variable selection procedure. method based Indirect Use Regularized Regression (IURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Imputes univariate missing data using Bayesian linear regression following preprocessing lasso variable selection step.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"","code":"mice.impute.lasso.select.norm(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"method consists following steps: given y variable imputation, fit linear regression lasso penalty using y[ry] dependent variable x[ry, ] predictors. Coefficients shrunk 0 define active set predictors used imputation Define Bayesian linear model using y[ry] dependent variable, active set x[ry, ] predictors, standard non-informative priors Draw parameter values intercept, regression weights, error variance posterior distribution Draw imputations posterior predictive distribution user can specify predictorMatrix mice call define predictors provided univariate imputation method. lasso regularization select, among variables indicated user, ones important imputation given iteration. Therefore, users may force exclusion predictor given imputation model specifying 0 entry. However, non-zero entry guarantee variable used, decision ultimately made lasso variable selection procedure. method based Indirect Use Regularized Regression (IURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear discriminant analysis — mice.impute.lda","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Imputes univariate missing data using linear discriminant analysis","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"","code":"mice.impute.lda(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments. used.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Vector imputed data, type factor, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Imputation categorical response variables linear discriminant analysis. function uses Venables/Ripley functions lda() predict.lda() compute posterior probabilities incomplete case, draws imputations posterior. function can called within Gibbs sampler specifying \"lda\" method argument mice(). method usually faster uses fewer resources calling function, statistical properties may good (Brand, 1999). mice.impute.polyreg.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"function incorporate variability discriminant weight, 'proper' sense Rubin. small samples rare categories y, variability imputed data therefore underestimated. Added: SvB June 2009 Tried include bootstrap, disabled since bootstrapping may easily lead constant variables within groups.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999). Development, Implementation Evaluation Multiple Imputation Strategies Statistical Analysis Incomplete Data Sets. Ph.D. Thesis, TNO Prevention Health/Erasmus University Rotterdam. ISBN 90-74479-08-1. Venables, W.N. & Ripley, B.D. (1997). Modern applied statistics S-PLUS (2nd ed). Springer, Berlin.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Imputes univariate missing data using logistic regression bootstrapped logistic regression model. bootstrap method draws simple bootstrap sample replacement observed data y[ry] x[ry, ].","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"","code":"mice.impute.logreg.boot(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000, 2011","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by logistic regression — mice.impute.logreg","title":"Imputation by logistic regression — mice.impute.logreg","text":"Imputes univariate missing data using logistic regression.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by logistic regression — mice.impute.logreg","text":"","code":"mice.impute.logreg(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by logistic regression — mice.impute.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by logistic regression — mice.impute.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by logistic regression — mice.impute.logreg","text":"Imputation binary response variables Bayesian logistic regression model (Rubin 1987, p. 169-170). Bayesian method consists following steps: Fit logit, find (bhat, V(bhat)) Draw BETA N(bhat, V(bhat)) Compute predicted scores m.d., .e. logit-1(X BETA) Compare score random (0,1) deviate, impute. method relies standard glm.fit function. Warnings glm.fit suppressed. Perfect prediction handled data augmentation method.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by logistic regression — mice.impute.logreg","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999). Development, Implementation Evaluation Multiple Imputation Strategies Statistical Analysis Incomplete Data Sets. Ph.D. Thesis, TNO Prevention Health/Erasmus University Rotterdam. ISBN 90-74479-08-1. Venables, W.N. & Ripley, B.D. (1997). Modern applied statistics S-Plus (2nd ed). Springer, Berlin. White, ., Daniel, R. Royston, P (2010). Avoiding bias due perfect prediction multiple imputation incomplete categorical variables. Computational Statistics Data Analysis, 54:22672275.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by logistic regression — mice.impute.logreg","text":"Stef van Buuren, Karin Groothuis-Oudshoorn","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by the mean — mice.impute.mean","title":"Imputation by the mean — mice.impute.mean","text":"Imputes arithmetic mean observed data","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by the mean — mice.impute.mean","text":"","code":"mice.impute.mean(y, ry, x = NULL, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by the mean — mice.impute.mean","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by the mean — mice.impute.mean","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by the mean — mice.impute.mean","text":"Imputing mean variable almost never appropriate. See Little Rubin (2002, p. 61-62) Van Buuren (2012, p. 10-11)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by the mean — mice.impute.mean","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Little, R.J.. Rubin, D.B. (2002). Statistical Analysis Missing Data. New York: John Wiley Sons. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Imputes univariate missing data using predictive mean matching.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"","code":"mice.impute.midastouch( y, ry, x, wy = NULL, ridge = 1e-05, midas.kappa = NULL, outout = TRUE, neff = NULL, debug = NULL, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ridge ridge penalty used .norm.draw() prevent problems multicollinearity. default ridge = 1e-05, means 0.01 percent diagonal added cross-product. Larger ridges may result biased estimates. highly noisy data (e.g. many junk variables), set ridge = 1e-06 even lower reduce bias. highly collinear data, set ridge = 1e-04 higher. midas.kappa Scalar. NULL (default) optimal kappa gets selected automatically. Alternatively, user may specify scalar. Siddique Belin 2008 find midas.kappa = 3 sensible. outout Logical. TRUE (default) one model estimated donor (leave-one-principle). speedup choose outout = FALSE, estimates one model observations leading -sample predictions donors --sample predictions recipients. Mind inappropriateness, though. neff EXPERTS. Null character string. name existing environment effective sample size donors loop (CE iterations times multiple imputations) supposed written. effective sample size necessary compute correction total variance originally suggested Parzen, Lipsitz Fitzmaurice 2005. objectname midastouch.neff. debug EXPERTS. Null character string. name existing environment input supposed written. objectname midastouch.inputlist. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Imputation y predictive mean matching, based Rubin (1987, p. 168, formulas b) Siddique Belin 2008. procedure follows: Draw bootstrap sample donor pool. Estimate beta matrix bootstrap sample leave one principle. Compute type II predicted values yobs (nobs x 1) ymis (nmis x nobs). Calculate distance yobs corresponding ymis. Convert distances drawing probabilities. recipient draw donor entire pool considering probabilities model. Take observed value y imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Gaffert, P., Meinfelder, F., Bosch V. (2015) Towards MI-proper Predictive Mean Matching, Discussion Paper. https://www.uni-bamberg.de/fileadmin/uni/fakultaeten/sowi_lehrstuehle/statistik/Personen/Dateien_Florian/properPMM.pdf Little, R.J.. (1988), Missing data adjustments large surveys (discussion), Journal Business Economics Statistics, 6, 287–301. Parzen, M., Lipsitz, S. R., Fitzmaurice, G. M. (2005), note reducing bias approximate Bayesian bootstrap imputation variance estimator. Biometrika 92, 4, 971–974. Rubin, D.B. (1987), Multiple imputation nonresponse surveys. New York: Wiley. Siddique, J., Belin, T.R. (2008), Multiple imputation using iterative hot-deck distance-based donor selection. Statistics medicine, 27, 1, 83–102 Van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006), Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064. Van Buuren, S., Groothuis-Oudshoorn, K. (2011), mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45, 3, 1–67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Philipp Gaffert, Florian Meinfelder, Volker Bosch 2015","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"","code":"# do default multiple imputation on a numeric matrix imp <- mice(nhanes, method = \"midastouch\") #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl imp #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"midastouch\" \"midastouch\" \"midastouch\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 # list the actual imputations for BMI imp$imp$bmi #> 1 2 3 4 5 #> 1 30.1 35.3 22.5 22.5 26.3 #> 3 30.1 30.1 30.1 29.6 22.0 #> 4 21.7 27.2 21.7 20.4 25.5 #> 6 21.7 27.4 25.5 25.5 25.5 #> 10 27.2 22.7 22.7 24.9 27.4 #> 11 30.1 29.6 30.1 22.5 22.0 #> 12 35.3 26.3 25.5 24.9 27.4 #> 16 30.1 29.6 30.1 22.5 22.0 #> 21 30.1 22.5 30.1 22.5 22.0 # first completed data matrix complete(imp) #> age bmi hyp chl #> 1 1 30.1 1 187 #> 2 2 22.7 1 187 #> 3 1 30.1 1 187 #> 4 3 21.7 2 186 #> 5 1 20.4 1 113 #> 6 3 21.7 1 184 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 10 2 27.2 1 186 #> 11 1 30.1 1 187 #> 12 2 35.3 1 229 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 187 #> 16 1 30.1 1 187 #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 206 #> 21 1 30.1 1 187 #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 284 #> 25 2 27.4 1 186 # imputation on mixed data with a different method per column mice(nhanes2, method = c(\"sample\", \"midastouch\", \"logreg\", \"norm\")) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"midastouch\" \"logreg\" \"norm\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0"},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Imputes univariate data user-specified MNAR mechanism linear logistic regression NARFCS. Sensitivity analysis different model specifications may shed light impact different MNAR assumptions conclusions.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"","code":"mice.impute.mnar.logreg(y, ry, x, wy = NULL, ums = NULL, umx = NULL, ...) mice.impute.mnar.norm(y, ry, x, wy = NULL, ums = NULL, umx = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ums string containing specification unidentifiable part imputation model (*unidentifiable model specification\"), , desired \\(\\delta\\)-adjustment (offset) function variables values corresponding deltas (sensitivity parameters). See details. umx auxiliary data matrix containing variables appear identifiable part imputation procedure specified via ums predictors unidentifiable part imputation model. See details. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"function imputes data thought Missing Random (MNAR) NARFCS method. NARFCS procedure (Tompsett et al, 2018) generalises -called \\(\\delta\\)-adjustment sensitivity analysis method Van Buuren, Boshuizen & Knook (1999) case multiple incomplete variables within FCS framework. practical terms, NARFCS procedure shifts imputations drawn iteration mice user-specified quantity can vary across subjects, reflect systematic departures missing data data distribution imputed MAR. Specification NARFCS model done blots argument mice(). blots parameter named list. variable imputed mice.impute.mnar.norm() mice.impute.mnar.logreg() corresponding element blots list least one argument ums , optionally, second argument umx. example, high-level call might like something like mice(nhanes[, c(2, 4)], method = c(\"pmm\", \"mnar.norm\"), blots = list(chl = list(ums = \"-3+2*bmi\"))). ums parameter required, might look like : \"-4+1*Y\". ums specifcation must following characteristics: single term corresponding intercept (constant) term, multiplied variable name, must included expression; term expression (corresponding intercept predictor variable) must separated either \"+\" \"-\" sign, depending sign sensitivity parameter; Within non-intercept term, sensitivity parameter value comes first predictor variable comes second, must separated \"*\" sign; categorical predictors, example variable Z K + 1 categories (\"Cat0\",\"Cat1\", ...,\"CatK\"), K category-specific terms needed, umx (see ) must specified concatenating variable name name category (e.g. ZCat1) named design matrix (argument x) passed univariate imputation function. example \"2+1*ZCat1-3*ZCat2\". given, umx specification must following characteristics: contains complete variables, missing values; numeric matrix. particular, categorical variables must represented dummy indicators names corresponding used ums refer category-specific terms (see ); number rows data argument passed main mice function; contain variables already predictors identifiable part model variable imputation. Limitation: present implementation can condition variables appear identifiable part imputation model (x) complete auxiliary variables passed via umx argument. possible specify models offset depends incomplete auxiliary variables. MNAR alternative see also mice.impute.ri.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Tompsett, D. M., Leacy, F., Moreno-Betancur, M., Heron, J., & White, . R. (2018). use --random fully conditional specification (NARFCS) procedure practice. Statistics Medicine, 37(15), 2338-2353. doi:10.1002/sim.7643 . Van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Margarita Moreno-Betancur, Stef van Buuren, Ian R. White, 2020.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"","code":"# 1: Example with no auxiliary data: only pass unidentifiable model specification (ums) # Specify argument to pass on to mnar imputation functions via \"blots\" argument mnar.blot <- list(X = list(ums = \"-4\"), Y = list(ums = \"2+1*ZCat1-3*ZCat2\")) # Run NARFCS by using mnar imputation methods and passing argument via blots impNARFCS <- mice(mnar_demo_data, method = c(\"mnar.logreg\", \"mnar.norm\", \"\"), blots = mnar.blot, seed = 234235, print = FALSE ) # Obtain MI results: Note they coincide with those from old version at # https://github.com/moreno-betancur/NARFCS pool(with(impNARFCS, lm(Y ~ X + Z)))$pooled$estimate #> [1] 19.368813 3.039045 -14.643202 -28.586061 # 2: Example passing also auxiliary data to MNAR procedure (umx) # Assumptions: # - Auxiliary data are complete, no missing values # - Auxiliary data are a numeric matrix # - Auxiliary data have same number of rows as x # - Auxiliary data have no overlapping variable names with x # Specify argument to pass on to mnar imputation functions via \"blots\" argument aux <- matrix(0:1, nrow = nrow(mnar_demo_data)) dimnames(aux) <- list(NULL, \"even\") mnar.blot <- list( X = list(ums = \"-4\"), Y = list(ums = \"2+1*ZCat1-3*ZCat2+0.5*even\", umx = aux) ) # Run NARFCS by using mnar imputation methods and passing argument via blots impNARFCS <- mice(mnar_demo_data, method = c(\"mnar.logreg\", \"mnar.norm\", \"\"), blots = mnar.blot, seed = 234235, print = FALSE ) # Obtain MI results: As expected they differ (slightly) from those # from old version at https://github.com/moreno-betancur/NARFCS pool(with(impNARFCS, lm(Y ~ X + Z)))$pooled$estimate #> [1] 19.521134 2.952546 -14.729454 -28.699292"},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"Imputes multivariate incomplete data among specific relations, instance, polynomials, interactions, range restrictions sum scores.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"","code":"mice.impute.mpmm(data, format = \"imputes\", ...)"},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"data matrix exactly two missing data patterns format character vector specifying type object returned. default format = \"imputes\". ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"matrix imputed data, ncol(y) columns sum(wy) rows.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"function implements predictive mean matching applies canonical regression analysis select donors fora set missing variables. general, canonical regressionanalysis looks linear combination covariates predicts linear combination outcomes (set missing variables) optimally least-square sense (Israels, 1987). predicted value linear combination set missing variables applied perform predictive mean matching.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"function requires variables block missingness pattern. one missingness pattern, function return warning.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"Mingyang Cai Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"","code":"# simulate data beta2 <- beta1 <- .5 x <- rnorm(1000) e <- rnorm(1000, 0, 1) y <- beta1 * x + beta2 * x^2 + e dat <- data.frame(y = y, x = x, x2 = x^2) m <- as.logical(rbinom(1000, 1, 0.25)) dat[m, c(\"x\", \"x2\")] <- NA # impute blk <- list(\"y\", c(\"x\", \"x2\")) meth <- c(\"\", \"mpmm\") imp <- mice(dat, blocks = blk, method = meth, print = FALSE, m = 2, maxit = 2) # analyse and check summary(pool(with(imp, lm(y ~ x + x2)))) #> term estimate std.error statistic df p.value #> 1 (Intercept) 0.03113943 0.04146686 0.7509473 38.589154 4.572395e-01 #> 2 x 0.50054117 0.03501063 14.2968326 37.065309 1.162119e-16 #> 3 x2 0.48960396 0.03097395 15.8069581 5.635635 6.971423e-06 with(dat, plot(x, x2, col = mdc(1))) with(complete(imp), points(x[m], x2[m], col = mdc(2)))"},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Imputes univariate missing data using linear regression bootstrap","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"","code":"mice.impute.norm.boot(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Draws bootstrap sample x[ry,] y[ry], calculates regression weights imputes normal residuals.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Gerko Vink, Stef van Buuren, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by Bayesian linear regression — mice.impute.norm","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Calculates imputations univariate missing data Bayesian linear regression, also known normal model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"","code":"mice.impute.norm(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Imputation y normal model method defined Rubin (1987, p. 167). procedure follows: Calculate cross-product matrix \\(S=X_{obs}'X_{obs}\\). Calculate \\(V = (S+{diag}(S)\\kappa)^{-1}\\), small ridge parameter \\(\\kappa\\). Calculate regression weights \\(\\hat\\beta = VX_{obs}'y_{obs}.\\) Draw random variable \\(\\dot g \\sim \\chi^2_\\nu\\) \\(\\nu=n_1 - q\\). Calculate \\(\\dot\\sigma^2 = (y_{obs} - X_{obs}\\hat\\beta)'(y_{obs} - X_{obs}\\hat\\beta)/\\dot g.\\) Draw \\(q\\) independent \\(N(0,1)\\) variates vector \\(\\dot z_1\\). Calculate \\(V^{1/2}\\) Cholesky decomposition. Calculate \\(\\dot\\beta = \\hat\\beta + \\dot\\sigma\\dot z_1 V^{1/2}\\). Draw \\(n_0\\) independent \\(N(0,1)\\) variates vector \\(\\dot z_2\\). Calculate \\(n_0\\) values \\(y_{imp} = X_{mis}\\dot\\beta + \\dot z_2\\dot\\sigma\\). Using mice.impute.norm columns emulates Schafer's NORM method (Schafer, 1997).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Rubin, D.B (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley & Sons. Schafer, J.L. (1997). Analysis incomplete multivariate data. London: Chapman & Hall.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Stef van Buuren, Karin Groothuis-Oudshoorn","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Imputes univariate missing data using linear regression analysis without accounting uncertainty model parameters.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"","code":"mice.impute.norm.nob(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"function creates imputations using spread around fitted linear regression line y given x, fitted observed data. function provided mainly allow comparison proper (e.g., implemented mice.impute.norm improper (function) normal imputation methods. large data, many rows, differences proper improper methods small, cases one may opt speed using mice.impute.norm.nob.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"function incorporate variability regression weights, 'proper' sense Rubin. small samples, variability imputed data therefore underestimated.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999). Development, Implementation Evaluation Multiple Imputation Strategies Statistical Analysis Incomplete Data Sets. Ph.D. Thesis, TNO Prevention Health/Erasmus University Rotterdam.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Gerko Vink, Stef van Buuren, Karin Groothuis-Oudshoorn, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear regression through prediction — mice.impute.norm.predict","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Imputes \"best value\" according linear regression model, also known regression imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"","code":"mice.impute.norm.predict(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Calculates regression weights observed data returns predicted values imputations. method known regression imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"METHOD USED DATA ANALYSIS. method seductive imputes likely value according model. However, ignores uncertainty missing values artificially amplifies relations columns data. Application richer models parameters help evade issues. Stochastic regression methods, like mice.impute.pmm mice.impute.norm, generally preferred. best, prediction can give reasonable estimates mean, especially normality assumptions plausible. See Little Rubin (2002, p. 62-64) Van Buuren (2012, p. 11-13, p. 45-46) discussion method.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Little, R.J.. Rubin, D.B. (2002). Statistical Analysis Missing Data. New York: John Wiley Sons. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Gerko Vink, Stef van Buuren, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute multilevel missing data using pan — mice.impute.panImpute","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"function wrapper around panImpute function mitml package can called impute blocks variables mice. mitml::panImpute function provides interface pan package multiple imputation multilevel data (Schafer & Yucel, 2002). Imputations can generated using type formula, offer different options model specification.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"","code":"mice.impute.panImpute( data, formula, type, m = 1, silent = TRUE, format = \"imputes\", ... )"},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"data data frame containing incomplete auxiliary variables, cluster indicator variable, variables present imputed datasets. formula formula specifying role variable imputation model. basic model constructed model.matrix, thus allowing include derived variables imputation model using (). See panImpute. type integer vector specifying role variable imputation model (see panImpute) m number imputed data sets generate. silent (optional) Logical flag indicating console output suppressed. Default FALSE. format character vector specifying type object returned. default format = \"list\". formats currently supported. ... named arguments: n.burn, n.iter, group, prior, silent others.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"list imputations incomplete variables model, can stored imp component mids object.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"number imputations m set 1, function called m times fits within mice iteration scheme. multivariate imputation function using joint model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"Grund S, Luedtke O, Robitzsch (2016). Multiple Imputation Multilevel Missing Data: Introduction R Package pan. SAGE Open. Schafer JL (1997). Analysis Incomplete Multivariate Data. London: Chapman & Hall. Schafer JL, Yucel RM (2002). Computational strategies multivariate linear mixed-effects models missing values. Journal Computational Graphical Statistics, 11, 437-457.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"Stef van Buuren, 2018, building work Simon Grund, Alexander Robitzsch Oliver Luedtke (authors mitml package) Joe Schafer (author pan package).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"","code":"blocks <- list(c(\"bmi\", \"chl\", \"hyp\"), \"age\") method <- c(\"panImpute\", \"pmm\") ini <- mice(nhanes, blocks = blocks, method = method, maxit = 0) pred <- ini$pred pred[\"B1\", \"hyp\"] <- -2 imp <- mice(nhanes, blocks = blocks, method = method, pred = pred, maxit = 1) #> #> iter imp variable #> 1 1 bmi chl hyp #> 1 2 bmi chl hyp #> 1 3 bmi chl hyp #> 1 4 bmi chl hyp #> 1 5 bmi chl hyp"},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":null,"dir":"Reference","previous_headings":"","what":"Passive imputation — mice.impute.passive","title":"Passive imputation — mice.impute.passive","text":"Calculate new variable imputation","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Passive imputation — mice.impute.passive","text":"","code":"mice.impute.passive(data, func)"},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Passive imputation — mice.impute.passive","text":"data data frame func formula specifying transformations data","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Passive imputation — mice.impute.passive","text":"result applying formula","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Passive imputation — mice.impute.passive","text":"Passive imputation special internal imputation function. Using facility, user can specify, point mice Gibbs sampling algorithm, function imputed data. useful, example, compute cubic version variable, transformation like Q = W/H^2 based two variables, mean variable like (x_1+x_2+x_3)/3. derived variables might used places imputation model. function allows dynamically derive virtually function imputed data virtually time.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Passive imputation — mice.impute.passive","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Passive imputation — mice.impute.passive","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by predictive mean matching — mice.impute.pmm","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Imputation predictive mean matching","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"","code":"mice.impute.pmm( y, ry, x, wy = NULL, donors = 5L, matchtype = 1L, exclude = NULL, quantify = TRUE, trim = 1L, ridge = 1e-05, use.matcher = FALSE, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. donors size donor pool among draw made. default donors = 5L. Setting donors = 1L always selects closest match, recommended. Values 3L 10L provide best results cases (Morris et al, 2015). matchtype Type matching distance. default choice (matchtype = 1L) calculates distance predicted value yobs drawn values ymis (called type-1 matching). choices matchtype = 0L (distance predicted values) matchtype = 2L (distance drawn values). exclude Dependent values exclude imputation model collection donor values quantify Logical. TRUE, factor levels replaced first canonical variate fitting imputation model. false, procedure reverts old behaviour takes integer codes (may lack sensible interpretation). Relevant y factor. trim Scalar integer. Minimum number observations required category order considered potential donor value. Relevant y factor. ridge ridge penalty used .norm.draw() prevent problems multicollinearity. default ridge = 1e-05, means 0.01 percent diagonal added cross-product. Larger ridges may result biased estimates. highly noisy data (e.g. many junk variables), set ridge = 1e-06 even lower reduce bias. highly collinear data, set ridge = 1e-04 higher. use.matcher Logical. Set use.matcher = TRUE specify C function matcher(), now deprecated matching function default versions 2.22 (June 2014) 3.11.7 (Oct 2020). Since version 3.12.0 mice() uses much faster matchindex C function. Use deprecated matcher function exact reproduction. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Imputation y predictive mean matching, based van Buuren (2012, p. 73). procedure follows: Calculate cross-product matrix \\(S=X_{obs}'X_{obs}\\). Calculate \\(V = (S+{diag}(S)\\kappa)^{-1}\\), small ridge parameter \\(\\kappa\\). Calculate regression weights \\(\\hat\\beta = VX_{obs}'y_{obs}.\\) Draw \\(q\\) independent \\(N(0,1)\\) variates vector \\(\\dot z_1\\). Calculate \\(V^{1/2}\\) Cholesky decomposition. Calculate \\(\\dot\\beta = \\hat\\beta + \\dot\\sigma\\dot z_1 V^{1/2}\\). Calculate \\(\\dot\\eta(,j)=|X_{{obs},[]|}\\hat\\beta-X_{{mis},[j]}\\dot\\beta\\) \\(=1,\\dots,n_1\\) \\(j=1,\\dots,n_0\\). Construct \\(n_0\\) sets \\(Z_j\\), containing \\(d\\) candidate donors, \\(y_{obs}\\) \\(\\sum_d\\dot\\eta(,j)\\) minimum \\(j=1,\\dots,n_0\\). Break ties randomly. Draw one donor \\(i_j\\) \\(Z_j\\) randomly \\(j=1,\\dots,n_0\\). Calculate imputations \\(\\dot y_j = y_{i_j}\\) \\(j=1,\\dots,n_0\\). name predictive mean matching proposed Little (1988).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Little, R.J.. (1988), Missing data adjustments large surveys (discussion), Journal Business Economics Statistics, 6, 287–301. Morris TP, White IR, Royston P (2015). Tuning multiple imputation predictive mean matching local residual draws. BMC Med Res Methodol. ;14:75. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Gerko Vink, Stef van Buuren, Karin Groothuis-Oudshoorn","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"","code":"# We normally call mice.impute.pmm() from within mice() # But we may call it directly as follows (not recommended) set.seed(53177) xname <- c(\"age\", \"hgt\", \"wgt\") r <- stats::complete.cases(boys[, xname]) x <- boys[r, xname] y <- boys[r, \"tv\"] ry <- !is.na(y) table(ry) #> ry #> FALSE TRUE #> 503 224 # percentage of missing data in tv sum(!ry) / length(ry) #> [1] 0.6918845 # Impute missing tv data yimp <- mice.impute.pmm(y, ry, x) length(yimp) #> [1] 503 hist(yimp, xlab = \"Imputed missing tv\") # Impute all tv data yimp <- mice.impute.pmm(y, ry, x, wy = rep(TRUE, length(y))) length(yimp) #> [1] 727 hist(yimp, xlab = \"Imputed missing and observed tv\") plot(jitter(y), jitter(yimp), main = \"Predictive mean matching on age, height and weight\", xlab = \"Observed tv (n = 224)\", ylab = \"Imputed tv (n = 224)\" ) abline(0, 1) cor(y, yimp, use = \"pair\") #> [1] 0.7415001 # Use blots to exclude different values per column # Create blots object blots <- make.blots(boys) # Exclude ml 1 through 5 from tv donor pool blots$tv$exclude <- c(1:5) # Exclude 100 random observed heights from tv donor pool blots$hgt$exclude <- sample(unique(boys$hgt), 100) imp <- mice(boys, method = \"pmm\", print = FALSE, blots = blots, seed=123) blots$hgt$exclude %in% unlist(c(imp$imp$hgt)) # MUST be all FALSE #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [61] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [97] FALSE FALSE FALSE FALSE blots$tv$exclude %in% unlist(c(imp$imp$tv)) # MUST be all FALSE #> [1] FALSE FALSE FALSE FALSE FALSE # Factor quantification xname <- c(\"age\", \"hgt\", \"wgt\") br <- boys[c(1:10, 101:110, 501:510, 601:620, 701:710), ] r <- stats::complete.cases(br[, xname]) x <- br[r, xname] y <- factor(br[r, \"tv\"]) ry <- !is.na(y) table(y) #> y #> 6 8 10 12 13 15 16 20 25 #> 1 2 1 1 1 4 1 4 7 # impute factor by optimizing canonical correlation y, x mice.impute.pmm(y, ry, x) #> [1] 25 25 25 20 25 25 20 25 25 25 15 25 25 25 25 25 15 15 25 15 20 15 8 25 8 #> [26] 25 20 20 15 25 25 15 15 25 25 15 20 8 #> Levels: 6 8 10 12 13 15 16 20 25 # only categories with at least 2 cases can be donor mice.impute.pmm(y, ry, x, trim = 2L) #> [1] 8 25 25 8 8 20 15 20 20 8 8 8 15 8 20 20 15 8 20 25 20 25 20 15 20 #> [26] 20 20 20 15 20 15 25 20 25 25 20 20 20 #> Levels: 6 8 10 12 13 15 16 20 25 # in addition, eliminate category 20 mice.impute.pmm(y, ry, x, trim = 2L, exclude = 20) #> [1] 8 25 15 25 15 8 8 25 25 25 8 15 15 8 8 8 25 25 25 25 15 8 8 15 15 #> [26] 25 15 8 15 15 25 25 15 25 25 15 25 25 #> Levels: 6 8 10 12 13 15 16 20 25 # to get old behavior: as.integer(y)) mice.impute.pmm(y, ry, x, quantify = FALSE) #> [1] 8 6 10 15 12 8 6 15 15 10 10 6 8 10 8 15 8 15 8 15 15 12 15 8 20 #> [26] 25 12 25 15 25 25 13 8 20 16 20 20 20 #> Levels: 6 8 10 12 13 15 16 20 25"},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of ordered data by polytomous regression — mice.impute.polr","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Imputes missing data categorical variable using polytomous regression","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"","code":"mice.impute.polr( y, ry, x, wy = NULL, nnet.maxit = 100, nnet.trace = FALSE, nnet.MaxNWts = 1500, polr.to.loggedEvents = FALSE, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nnet.maxit Tuning parameter nnet(). nnet.trace Tuning parameter nnet(). nnet.MaxNWts Tuning parameter nnet(). polr..loggedEvents logical indicating whether fallback multinom() function written loggedEvents. default FALSE. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"function mice.impute.polr() imputes ordered categorical response variables proportional odds logistic regression (polr) model. function repeatedly applies logistic regression successive splits. model also known cumulative link model. default, ordered factors two levels imputed mice.impute.polr. algorithm mice.impute.polr uses function polr() MASS package. order avoid bias due perfect prediction, algorithm augment data according method White, Daniel Royston (2010). call polr might fail, usually data sparse. case, multinom tried fallback. local flag polr..loggedEvents set TRUE, record written loggedEvents component mids object. Use mice(data, polr..loggedEvents = TRUE) set flag.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"December 2019 Simon White alerted polr always fail silently. can confirm behaviour versions mice 3.0.0 - mice 3.6.6, method requests polr versions fact handled multinom. See https://github.com/amices/mice/issues/206 details.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University. White, .R., Daniel, R. Royston, P. (2010). Avoiding bias due perfect prediction multiple imputation incomplete categorical variables. Computational Statistics Data Analysis, 54, 2267-2275. Venables, W.N. & Ripley, B.D. (2002). Modern applied statistics S-Plus (4th ed). Springer, Berlin.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000-2010","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Imputes missing data categorical variable using polytomous regression","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"","code":"mice.impute.polyreg( y, ry, x, wy = NULL, nnet.maxit = 100, nnet.trace = FALSE, nnet.MaxNWts = 1500, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nnet.maxit Tuning parameter nnet(). nnet.trace Tuning parameter nnet(). nnet.MaxNWts Tuning parameter nnet(). ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"function mice.impute.polyreg() imputes categorical response variables Bayesian polytomous regression model. See J.P.L. Brand (1999), Chapter 4, Appendix B. default, unordered factors two levels imputed mice.impute.polyreg(). method consists following steps: Fit categorical response multinomial model Compute predicted categories Add appropriate noise predictions algorithm mice.impute.polyreg uses function multinom() nnet package. order avoid bias due perfect prediction, algorithm augment data according method White, Daniel Royston (2010).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University. White, .R., Daniel, R. Royston, P. (2010). Avoiding bias due perfect prediction multiple imputation incomplete categorical variables. Computational Statistics Data Analysis, 54, 2267-2275. Venables, W.N. & Ripley, B.D. (2002). Modern applied statistics S-Plus (4th ed). Springer, Berlin.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000-2010","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of quadratic terms — mice.impute.quadratic","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"Imputes incomplete variable appears main effect quadratic effect complete-data model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"","code":"mice.impute.quadratic(y, ry, x, wy = NULL, quad.outcome = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. quad.outcome name outcome quadratic analysis character string. example, substantive model interest y ~ x + xx, \"y\" quad.outcome ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"function implements \"polynomial combination\" method. First, polynomial combination \\(Z = Y \\beta_1 + Y^2 \\beta_2\\) formed. \\(Z\\) imputed predictive mean matching, followed decomposition imputed data \\(Z\\) components \\(Y\\) \\(Y^2\\). See Van Buuren (2012, pp. 139-141) Vink et al (2012) details. method ensures 1) imputed data \\(Y\\) \\(Y^2\\) mutually consistent, 2) provides unbiased estimates regression weights complete-data linear regression use \\(Y\\) \\(Y^2\\).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"two situations consider. linear term Y present data, calculate quadratic term YY imputation. linear term Y quadratic term YY variables data, first impute Y calling mice.impute.quadratic() Y, impute YY passive imputation meth[\"YY\"] <- \"~(Y^2)\". See example section details. Generally, like YY present data need preserve quadratic relations YY third variables multivariate incomplete data might wish impute.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"Mingyang Cai Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"","code":"# Create Data B1 <- .5 B2 <- .5 X <- rnorm(1000) XX <- X^2 e <- rnorm(1000, 0, 1) Y <- B1 * X + B2 * XX + e dat <- data.frame(x = X, xx = XX, y = Y) # Impose 25 percent MCAR Missingness dat[0 == rbinom(1000, 1, 1 - .25), 1:2] <- NA # Prepare data for imputation ini <- mice(dat, maxit = 0) meth <- c(\"quadratic\", \"~I(x^2)\", \"\") pred <- ini$pred pred[, \"xx\"] <- 0 # Impute data imp <- mice(dat, meth = meth, pred = pred, quad.outcome = \"y\") #> #> iter imp variable #> 1 1 x xx #> 1 2 x xx #> 1 3 x xx #> 1 4 x xx #> 1 5 x xx #> 2 1 x xx #> 2 2 x xx #> 2 3 x xx #> 2 4 x xx #> 2 5 x xx #> 3 1 x xx #> 3 2 x xx #> 3 3 x xx #> 3 4 x xx #> 3 5 x xx #> 4 1 x xx #> 4 2 x xx #> 4 3 x xx #> 4 4 x xx #> 4 5 x xx #> 5 1 x xx #> 5 2 x xx #> 5 3 x xx #> 5 4 x xx #> 5 5 x xx # Pool results pool(with(imp, lm(y ~ x + xx))) #> Class: mipo m = 5 #> term m estimate ubar b t dfcom #> 1 (Intercept) 5 0.09523804 0.0014726259 0.0001460981 0.0016479437 997 #> 2 x 5 0.47686983 0.0009562814 0.0003835250 0.0014165114 997 #> 3 xx 5 0.49101019 0.0004636236 0.0001422658 0.0006343426 997 #> df riv lambda fmi #> 1 252.89879 0.1190511 0.1063858 0.1133699 #> 2 35.86887 0.4812705 0.3249038 0.3596410 #> 3 51.32816 0.3682275 0.2691274 0.2960333 # Plot results stripplot(imp) plot(dat$x, dat$xx, col = mdc(1), xlab = \"x\", ylab = \"xx\") cmp <- complete(imp) points(cmp$x[is.na(dat$x)], cmp$xx[is.na(dat$x)], col = mdc(2))"},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by random forests — mice.impute.rf","title":"Imputation by random forests — mice.impute.rf","text":"Imputes univariate missing data using random forests.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by random forests — mice.impute.rf","text":"","code":"mice.impute.rf( y, ry, x, wy = NULL, ntree = 10, rfPackage = c(\"ranger\", \"randomForest\", \"literanger\"), ... )"},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by random forests — mice.impute.rf","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ntree number trees grow. default 10. rfPackage single string specifying backend estimating random forest. default backend ranger package. alternative literanger predicts faster support forest types split rules ranger. Also implemented alternative randomForest package, used default mice 3.13.10 earlier. ... named arguments passed mice:::install..demand(), randomForest::randomForest(), randomForest:::randomForest.default(), ranger::ranger(), literanger::train().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by random forests — mice.impute.rf","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by random forests — mice.impute.rf","text":"Imputation y random forests. method calls randomForrest() implements Breiman's random forest algorithm (based Breiman Cutler's original Fortran code) classification regression. See Appendix .1 Doove et al. (2014) definition algorithm used.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by random forests — mice.impute.rf","text":"alternative implementation independently developed Shah et al (2014). available functions CALIBERrfimpute::mice.impute.rfcat CALIBERrfimpute::mice.impute.rfcont (now archived). Simulations Shah (Feb 13, 2014) suggested quality imputation 10 100 trees identical, mice 2.22 changed default number trees ntree = 100 ntree = 10.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by random forests — mice.impute.rf","text":"Doove, L.L., van Buuren, S., Dusseldorp, E. (2014), Recursive partitioning missing data imputation presence interaction Effects. Computational Statistics & Data Analysis, 72, 92-104. Shah, .D., Bartlett, J.W., Carpenter, J., Nicholas, O., Hemingway, H. (2014), Comparison random forest parametric imputation models imputing missing data using MICE: CALIBER study. American Journal Epidemiology, doi:10.1093/aje/kwt312 . Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by random forests — mice.impute.rf","text":"Lisa Doove, Stef van Buuren, Elise Dusseldorp, 2012; Patrick Rockenschaub, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by random forests — mice.impute.rf","text":"","code":"if (FALSE) { # \\dontrun{ imp <- mice(nhanes2, meth = \"rf\", ntree = 3) plot(imp) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Imputes nonignorable missing data random indicator method.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"","code":"mice.impute.ri(y, ry, x, wy = NULL, ri.maxit = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ri.maxit Number inner iterations ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"random indicator method estimates offset distribution observed missing data using algorithm iterates response imputation models. routine assumes response model imputation model predictors. MNAR alternative see also mice.impute.mnar.logreg.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Jolani, S. (2012). Dual Imputation Strategies Analyzing Incomplete Data. Dissertation. University Utrecht, Dec 7 2012.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Shahab Jolani (University Utrecht)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by simple random sampling — mice.impute.sample","title":"Imputation by simple random sampling — mice.impute.sample","text":"Imputes random sample observed y data","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by simple random sampling — mice.impute.sample","text":"","code":"mice.impute.sample(y, ry, x = NULL, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by simple random sampling — mice.impute.sample","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by simple random sampling — mice.impute.sample","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by simple random sampling — mice.impute.sample","text":"function takes simple random sample observed values y, returns imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by simple random sampling — mice.impute.sample","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by simple random sampling — mice.impute.sample","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000, 2017","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"Takes mids object, produces new object class mids.","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"","code":"mice.mids(obj, newdata = NULL, maxit = 1, printFlag = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"obj object class mids, typically produces previous call mice() mice.mids() newdata optional data.frame multiple imputations generated according model obj. maxit number additional Gibbs sampling iterations. printFlag Boolean flag. TRUE, diagnostic information Gibbs sampling iterations written command window. default TRUE. ... Named arguments passed univariate imputation functions.","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"function enables user split computations Gibbs sampler smaller parts. useful following reasons: RAM memory may become easily exhausted number iterations large. Returning prompt/session level may alleviate problems. user can compute customized convergence statistics specific points, e.g. iteration, monitoring convergence. - computing 'extra iterations'. Note: imputation model specified mice() function changed mice.mids. state random generator saved mids object.","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"","code":"imp1 <- mice(nhanes, maxit = 1, seed = 123) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl imp2 <- mice.mids(imp1) #> #> iter imp variable #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl # yields the same result as imp <- mice(nhanes, maxit = 2, seed = 123) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl # verification identical(imp$imp, imp2$imp) #> [1] TRUE #"},{"path":"https://amices.org/mice/reference/mice.theme.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the theme for the plotting Trellis functions — mice.theme","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"mice.theme() function sets default choices Trellis plots built mice.","code":""},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"","code":"mice.theme(transparent = TRUE, alpha.fill = 0.3)"},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"transparent logical indicating whether alpha-transparency allowed. default TRUE. alpha.fill numerical values 0 1 indicates default alpha value fills.","code":""},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"mice.theme() returns named list can used theme functions lattice. default, mice.theme() function sets transparent <- TRUE current device .Device supports semi-transparent colors.","code":""},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"Stef van Buuren 2011","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiply imputed data set (mids) — mids-class","title":"Multiply imputed data set (mids) — mids-class","text":"mids object contains multiply imputed data set. mids object generated functions mice(), mice.mids(), cbind.mids(), rbind.mids() ibind.mids().","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiply imputed data set (mids) — mids-class","text":"mids class objects methods following generic functions: print, summary, plot. loggedEvents entry matrix five columns containing record automatic removal actions. NULL action made. initialization program following three actions: 1 variable contains missing values, imputed used predictor removed 2 constant variable removed 3 collinear variable removed. iteration, program following actions: 1 One variables linearly dependent removed (categorical data, 'variable' corresponds dummy variable) 2 Proportional odds regression imputation converge replaced polyreg. Explanation elements loggedEvents: iteration number record added, im imputation number, dep name dependent variable, meth imputation method used, (possibly long) character vector names altered removed predictors.","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multiply imputed data set (mids) — mids-class","text":"mice package use S4 class definitions, instead relies S3 list equivalent oldClass(obj) <- \"mids\".","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Multiply imputed data set (mids) — mids-class","text":".Data: Object class \"list\" containing following slots: data: Original (incomplete) data set. imp: list ncol(data) components generated multiple imputations. list component data.frame (nmis[j] m) imputed values variable j. NULL component used variables imputations generated. m: Number imputations. : argument mice() function. blocks: blocks argument mice() function. call: Call created object. nmis: array containing number missing observations per column. method: vector strings length(blocks specifying imputation method per block. predictorMatrix: numerical matrix containing integers specifying predictor set. visitSequence: vector variable block names specifies variables blocks visited one iteration throuh data. formulas: named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. post: vector strings length length(blocks) commands post-processing. blots: \"Block dots\". blots argument mice() function. ignore: logical vector length nrow(data) indicating rows data used build imputation model. (new mice 3.12.0) seed: seed value solution. iteration: Last Gibbs sampling iteration number. lastSeedValue: recent seed value. chainMean: array dimensions ncol maxit m elements containing mean generated multiple imputations. array can used monitoring convergence. Note observed data present mean. chainVar: array similar structure chainMean, containing variance imputed values. loggedEvents: data.frame five columns containing warnings, corrective actions, inside info. version: Version number mice package created object. date: Date object created.","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiply imputed data set (mids) — mids-class","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mids-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiply imputed data set (mids) — mids-class","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":null,"dir":"Reference","previous_headings":"","what":"Export mids object to Mplus — mids2mplus","title":"Export mids object to Mplus — mids2mplus","text":"Converts mids object format recognized Mplus, writes data Mplus input files","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export mids object to Mplus — mids2mplus","text":"","code":"mids2mplus( imp, file.prefix = \"imp\", path = getwd(), sep = \"\\t\", dec = \".\", silent = FALSE )"},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export mids object to Mplus — mids2mplus","text":"imp imp argument object class mids, typically produced mice() function. file.prefix character string describing prefix output data files. path character string containing path output file. default, files written current R working directory. sep separator data fields. dec decimal separator numerical data. silent logical flag stating whether names files printed.","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export mids object to Mplus — mids2mplus","text":"return value NULL.","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Export mids object to Mplus — mids2mplus","text":"function automates work needed export mids object Mplus. function writes multiple imputation datasets, file contains names multiple imputation data sets Mplus input file. Mplus input file proper file names, principle run read data without alteration. Mplus recognize data set multiply imputed data set, automatic pooling procedures supported.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Export mids object to Mplus — mids2mplus","text":"Gerko Vink, 2011.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":null,"dir":"Reference","previous_headings":"","what":"Export mids object to SPSS — mids2spss","title":"Export mids object to SPSS — mids2spss","text":"Converts mids object format recognized SPSS, writes data SPSS syntax files.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export mids object to SPSS — mids2spss","text":"","code":"mids2spss( imp, filename = \"midsdata\", path = getwd(), compress = FALSE, silent = FALSE )"},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export mids object to SPSS — mids2spss","text":"imp imp argument object class mids, typically produced mice() function. filename character string describing name output data file extension. path character string containing path output file. value path appended filedat. default, files written current R working directory. path=NULL file path appending done. compress logical flag stating whether resulting SPSS set compressed .zsav file. silent logical flag stating whether location saved file printed.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export mids object to SPSS — mids2spss","text":"return value NULL.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Export mids object to SPSS — mids2spss","text":"function automates work needed export mids object SPSS. uses haven::write_sav() facilitate export SPSS .sav .zsav file. things pay attention . SPSS syntax file proper file names separators set, principle run read data without alteration. SPSS strict R respect paths. Always use full path, otherwise SPSS may able find data file. Factors R translate categorical variables SPSS. internal coding factor levels used R exported. generally acceptable SPSS. However, data combined existing SPSS data, watch changes factor levels codes. SPSS recognize data set multiply imputed data set, automatic pooling procedures supported. Note however pooling extra option available license MISSING VALUES module. Without license, SPSS still recognize structure data, pool multiply imputed estimates single inference.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Export mids object to SPSS — mids2spss","text":"Gerko Vink, dec 2020.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"mipo: Multiple imputation pooled object — mipo","title":"mipo: Multiple imputation pooled object — mipo","text":"mipo object contains results pooling step. function pool generates object class mipo.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"mipo: Multiple imputation pooled object — mipo","text":"","code":"mipo(mira.obj, ...) # S3 method for class 'mipo' summary( object, type = c(\"tests\", \"all\"), conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ... ) # S3 method for class 'mipo' print(x, ...) # S3 method for class 'mipo.summary' print(x, ...) process_mipo(z, x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE)"},{"path":"https://amices.org/mice/reference/mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"mipo: Multiple imputation pooled object — mipo","text":"mira.obj object class mira ... Arguments passed object object class mipo conf.int Logical indicating whether include confidence interval. conf.level Confidence level interval, used conf.int = TRUE. Number 0 1. exponentiate Flag indicating whether exponentiate coefficient estimates confidence intervals (typical logistic regression). x object class mipo z Data frame tidied version coefficient matrix","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"mipo: Multiple imputation pooled object — mipo","text":"summary method returns data frame summary statistics pooled analysis.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"mipo: Multiple imputation pooled object — mipo","text":"object class mipo list elements: call, m, pooled glanced. pooled elements data frame columns: names terms stored row.names(pooled). glanced elements data.frame m rows. precise composition depends class complete-data analysis. least field nobs expected present. process_mipo helper function process tidied mipo object, normally called directly. adds confidence interval, optionally exponentiates, result.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"mipo: Multiple imputation pooled object — mipo","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mira-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiply imputed repeated analyses (mira) — mira-class","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"mira object generated .mids() function. .mira() function takes results repeated complete-data analysis stored list, turns mira object can pooled.","code":""},{"path":"https://amices.org/mice/reference/mira-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"versions prior mice 3.0 pooling required coef() vcov() methods available fitted objects. feature longer supported. reason vcov() methods inconsistent across packages, leading buggy behaviour pool() function. Since mice 3.0+, broom package takes care filtering relevant parts complete-data analysis. may happen see messages like method tidying S3 object class ... Error: glance method objects class .... royal way solve problem write glance() tidy() methods add broom according specifications given https://broom.tidymodels.org. mira class objects methods following generic functions: print, summary. Many functions mice package use S4 class definitions, instead rely S3 list equivalent oldClass(obj) <- \"mira\".","code":""},{"path":"https://amices.org/mice/reference/mira-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Multiply imputed repeated analyses (mira) — mira-class","text":".Data: Object class \"list\" containing following slots: call: call created object. call1: call created mids object used call. nmis: array containing number missing observations per column. analyses: list m components containing individual fit objects m complete data analyses.","code":""},{"path":"https://amices.org/mice/reference/mira-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mira-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":null,"dir":"Reference","previous_headings":"","what":"MNAR demo data — mnar_demo_data","title":"MNAR demo data — mnar_demo_data","text":"toy example Margarita Moreno-Betancur checking NARFCS.","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"MNAR demo data — mnar_demo_data","text":"","code":"mnar_demo_data"},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"MNAR demo data — mnar_demo_data","text":"object class data.frame 500 rows 3 columns.","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"MNAR demo data — mnar_demo_data","text":"https://github.com/moreno-betancur/NARFCS/blob/master/datmis.csv","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"MNAR demo data — mnar_demo_data","text":"small dataset just three columns.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Name imputation blocks — name.blocks","title":"Name imputation blocks — name.blocks","text":"helper function names unnamed elements blocks specification. convenience function.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Name imputation blocks — name.blocks","text":"","code":"name.blocks(blocks, prefix = \"B\")"},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Name imputation blocks — name.blocks","text":"blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. prefix character vector length 1 prefix using naming unnamed blocks two variables.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Name imputation blocks — name.blocks","text":"named list character vectors variables names.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Name imputation blocks — name.blocks","text":"function name unnamed list elements specified optional argument blocks. Unnamed blocks consisting just one variable named variable. Unnamed blocks containing one variables named prefix argument, padded integer sequence stating 1.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Name imputation blocks — name.blocks","text":"","code":"blocks <- list(c(\"hyp\", \"chl\"), AGE = \"age\", c(\"bmi\", \"hyp\"), \"edu\") name.blocks(blocks) #> $B1 #> [1] \"hyp\" \"chl\" #> #> $AGE #> [1] \"age\" #> #> $B2 #> [1] \"bmi\" \"hyp\" #> #> $edu #> [1] \"edu\" #>"},{"path":"https://amices.org/mice/reference/name.formulas.html","id":null,"dir":"Reference","previous_headings":"","what":"Name formula list elements — name.formulas","title":"Name formula list elements — name.formulas","text":"helper function names unnamed elements formula list. convenience function.","code":""},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Name formula list elements — name.formulas","text":"","code":"name.formulas(formulas, prefix = \"F\")"},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Name formula list elements — name.formulas","text":"formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. prefix character vector length 1 prefix using naming unnamed blocks two variables.","code":""},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Name formula list elements — name.formulas","text":"Named list formulas","code":""},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Name formula list elements — name.formulas","text":"function name unnamed list elements specified optional argument formula. Unnamed formula's consisting just one response variable named variable. Unnamed formula's containing one variable named prefix argument, padded integer sequence stating 1.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Name formula list elements — name.formulas","text":"","code":"# fully conditionally specified main effects model form1 <- list( bmi ~ age + chl + hyp, hyp ~ age + bmi + chl, chl ~ age + bmi + hyp ) form1 <- name.formulas(form1) imp1 <- mice(nhanes, formulas = form1, print = FALSE, m = 1, seed = 12199) # same model using dot notation form2 <- list(bmi ~ ., hyp ~ ., chl ~ .) form2 <- name.formulas(form2) imp2 <- mice(nhanes, formulas = form2, print = FALSE, m = 1, seed = 12199) identical(complete(imp1), complete(imp2)) #> [1] FALSE # same model using repeated multivariate imputation form3 <- name.blocks(list(all = bmi + hyp + chl ~ .)) imp3 <- mice(nhanes, formulas = form3, print = FALSE, m = 1, seed = 12199) cmp3 <- complete(imp3) identical(complete(imp1), complete(imp3)) #> [1] FALSE # same model using predictorMatrix imp4 <- mice(nhanes, print = FALSE, m = 1, seed = 12199, auxiliary = TRUE) identical(complete(imp1), complete(imp4)) #> [1] FALSE # different model: multivariate imputation for chl and bmi form5 <- list(chl + bmi ~ ., hyp ~ bmi + age) form5 <- name.formulas(form5) imp5 <- mice(nhanes, formulas = form5, print = FALSE, m = 1, seed = 71712)"},{"path":"https://amices.org/mice/reference/ncc.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of complete cases — ncc","title":"Number of complete cases — ncc","text":"Calculates number complete cases.","code":""},{"path":"https://amices.org/mice/reference/ncc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of complete cases — ncc","text":"","code":"ncc(x)"},{"path":"https://amices.org/mice/reference/ncc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of complete cases — ncc","text":"x R object. Currently supported methods following classes: mids, data.frame matrix. Also, x can vector.","code":""},{"path":"https://amices.org/mice/reference/ncc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of complete cases — ncc","text":"Number elements x complete data.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ncc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Number of complete cases — ncc","text":"Stef van Buuren, 2017","code":""},{"path":"https://amices.org/mice/reference/ncc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of complete cases — ncc","text":"","code":"ncc(nhanes) # 13 complete cases #> [1] 13"},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"Calculates cumulative hazard rate (Nelson-Aalen estimator)","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"","code":"nelsonaalen(data, timevar, statusvar)"},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"data data frame containing data. timevar name time variable data. statusvar name event variable, e.g. death data.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"vector nrow(data) elements containing Nelson-Aalen estimates cumulative hazard function.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"function useful imputing variables depend survival time. White Royston (2009) suggested using cumulative hazard survival time H0(T) rather T log(T) predictor imputation models. See section 7.1 Van Buuren (2012) example.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"White, . R., Royston, P. (2009). Imputing missing covariate values Cox model. Statistics Medicine, 28(15), 1982-1998. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"","code":"require(MASS) #> Loading required package: MASS #> #> Attaching package: ‘MASS’ #> The following object is masked from ‘package:dplyr’: #> #> select leuk$status <- 1 ## no censoring occurs in leuk data (MASS) ch <- nelsonaalen(leuk, time, status) plot(x = leuk$time, y = ch, ylab = \"Cumulative hazard\", xlab = \"Time\") ### See example on http://www.engineeredsoftware.com/lmar/pe_cum_hazard_function.htm time <- c(43, 67, 92, 94, 149, rep(149, 7)) status <- c(rep(1, 5), rep(0, 7)) eng <- data.frame(time, status) ch <- nelsonaalen(eng, time, status) plot(x = time, y = ch, ylab = \"Cumulative hazard\", xlab = \"Time\")"},{"path":"https://amices.org/mice/reference/nhanes.html","id":null,"dir":"Reference","previous_headings":"","what":"NHANES example - all variables numerical — nhanes","title":"NHANES example - all variables numerical — nhanes","text":"small data set non-monotone missing values.","code":""},{"path":"https://amices.org/mice/reference/nhanes.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"NHANES example - all variables numerical — nhanes","text":"data frame 25 observations following 4 variables. age Age group (1=20-39, 2=40-59, 3=60+) bmi Body mass index (kg/m**2) hyp Hypertensive (1=,2=yes) chl Total serum cholesterol (mg/dL)","code":""},{"path":"https://amices.org/mice/reference/nhanes.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"NHANES example - all variables numerical — nhanes","text":"Schafer, J.L. (1997). Analysis Incomplete Multivariate Data. London: Chapman & Hall. Table 6.14.","code":""},{"path":"https://amices.org/mice/reference/nhanes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"NHANES example - all variables numerical — nhanes","text":"small data set numerical variables. data set nhanes2 data set, age hyp treated factors.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nhanes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"NHANES example - all variables numerical — nhanes","text":"","code":"# create 5 imputed data sets imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # print the first imputed data set complete(imp) #> age bmi hyp chl #> 1 1 25.5 1 187 #> 2 2 22.7 1 187 #> 3 1 27.2 1 187 #> 4 3 24.9 2 218 #> 5 1 20.4 1 113 #> 6 3 20.4 1 184 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 10 2 30.1 2 218 #> 11 1 27.2 1 187 #> 12 2 27.2 2 206 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 238 #> 16 1 26.3 1 187 #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 206 #> 21 1 35.3 1 204 #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 206 #> 25 2 27.4 1 186"},{"path":"https://amices.org/mice/reference/nhanes2.html","id":null,"dir":"Reference","previous_headings":"","what":"NHANES example - mixed numerical and discrete variables — nhanes2","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"small data set non-monotone missing values.","code":""},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"data frame 25 observations following 4 variables. age Age group (1=20-39, 2=40-59, 3=60+) bmi Body mass index (kg/m**2) hyp Hypertensive (1=,2=yes) chl Total serum cholesterol (mg/dL)","code":""},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"Schafer, J.L. (1997). Analysis Incomplete Multivariate Data. London: Chapman & Hall. Table 6.14.","code":""},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"small data set missing data mixed numerical discrete variables. data set nhanes data set, data treated numerical.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"","code":"# create 5 imputed data sets imp <- mice(nhanes2) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # print the first imputed data set complete(imp) #> age bmi hyp chl #> 1 20-39 25.5 no 118 #> 2 40-59 22.7 no 187 #> 3 20-39 26.3 no 187 #> 4 60-99 22.7 yes 218 #> 5 20-39 20.4 no 113 #> 6 60-99 21.7 yes 184 #> 7 20-39 22.5 no 118 #> 8 20-39 30.1 no 187 #> 9 40-59 22.0 no 238 #> 10 40-59 24.9 no 204 #> 11 20-39 29.6 no 187 #> 12 40-59 22.0 no 229 #> 13 60-99 21.7 no 206 #> 14 40-59 28.7 yes 204 #> 15 20-39 29.6 no 238 #> 16 20-39 29.6 no 238 #> 17 60-99 27.2 yes 284 #> 18 40-59 26.3 yes 199 #> 19 20-39 35.3 no 218 #> 20 60-99 25.5 yes 206 #> 21 20-39 22.5 no 238 #> 22 20-39 33.2 no 229 #> 23 20-39 27.5 no 131 #> 24 60-99 24.9 no 206 #> 25 40-59 27.4 no 186"},{"path":"https://amices.org/mice/reference/nic.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of incomplete cases — nic","title":"Number of incomplete cases — nic","text":"Calculates number incomplete cases.","code":""},{"path":"https://amices.org/mice/reference/nic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of incomplete cases — nic","text":"","code":"nic(x)"},{"path":"https://amices.org/mice/reference/nic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of incomplete cases — nic","text":"x R object. Currently supported methods following classes: mids, data.frame matrix. Also, x can vector.","code":""},{"path":"https://amices.org/mice/reference/nic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of incomplete cases — nic","text":"Number elements x incomplete data.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Number of incomplete cases — nic","text":"Stef van Buuren, 2017","code":""},{"path":"https://amices.org/mice/reference/nic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of incomplete cases — nic","text":"","code":"nic(nhanes) # the remaining 12 rows #> [1] 12 nic(nhanes[, c(\"bmi\", \"hyp\")]) # number of cases with incomplete bmi and hyp #> [1] 9"},{"path":"https://amices.org/mice/reference/nimp.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of imputations per block — nimp","title":"Number of imputations per block — nimp","text":"Calculates number cells within block imputation requested.","code":""},{"path":"https://amices.org/mice/reference/nimp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of imputations per block — nimp","text":"","code":"nimp(where, blocks = make.blocks(where))"},{"path":"https://amices.org/mice/reference/nimp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of imputations per block — nimp","text":"data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited.","code":""},{"path":"https://amices.org/mice/reference/nimp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of imputations per block — nimp","text":"numeric vector length length(blocks) containing number cells need imputed within block.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nimp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of imputations per block — nimp","text":"","code":"where <- is.na(nhanes) # standard FCS nimp(where) #> age bmi hyp chl #> 0 9 8 10 # user-defined blocks nimp(where, blocks = name.blocks(list(c(\"bmi\", \"hyp\"), \"age\", \"chl\"))) #> B1 age chl #> 17 0 10"},{"path":"https://amices.org/mice/reference/norm.draw.html","id":null,"dir":"Reference","previous_headings":"","what":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"function draws random values beta sigma Bayesian linear regression model described Rubin (1987, p. 167). function can called user-specified imputation functions.","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"","code":"norm.draw(y, ry, x, rank.adjust = TRUE, ...) .norm.draw(y, ry, x, rank.adjust = TRUE, ...)"},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"y Incomplete data vector length n ry Vector missing data pattern (FALSE=missing, TRUE=observed) x Matrix (n x p) complete covariates. rank.adjust Argument specifies whether NA's coefficients need set zero. relevant ls.meth = \"qr\" predictor matrix rank-deficient. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"list containing components coef (least squares estimate), beta (drawn regression weights) sigma (drawn value residual standard deviation).","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"Rubin, D.B. (1987). Multiple imputation nonresponse surveys. New York: Wiley.","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"Gerko Vink, 2018, version, based earlier versions written Stef van Buuren, Karin Groothuis-Oudshoorn, 2017","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function that runs MICE in parallel — parlmice","title":"Wrapper function that runs MICE in parallel — parlmice","text":"function included backward compatibility. function superseded futuremice.","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function that runs MICE in parallel — parlmice","text":"","code":"parlmice( data, m = 5, seed = NA, cluster.seed = NA, n.core = NULL, n.imp.core = NULL, cl.type = \"PSOCK\", ... )"},{"path":"https://amices.org/mice/reference/parlmice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function that runs MICE in parallel — parlmice","text":"data data frame matrix containing incomplete data. Similar first argument mice. m number desired imputated datasets. default $m=5$ mice seed scalar used seed value mice algorithm within parallel stream. Please note imputations streams , hence, used n.core = 1 desired obtain output mice. cluster.seed scalar used seed value. recommended put seed value outside function, otherwise parallel processes performed separate, random seeds. n.core scalar indicating number cores used. n.imp.core scalar indicating number imputations per core. cl.type cluster type. Default value \"PSOCK\". Posix machines (linux, Mac) generally benefit much faster cluster computation type set type = \"FORK\". ... Named arguments passed function mice makeCluster.","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function that runs MICE in parallel — parlmice","text":"mids object defined mids-class","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrapper function that runs MICE in parallel — parlmice","text":"function relies package parallel, base package R versions 2.14.0 later. chosen use parallel function parLapply allow use parlmice Mac, Linux Windows systems. reason, use Parallel Socket Cluster (PSOCK) type default. systems Windows, can hugely beneficial change cluster type FORK, generally results improved memory handling. memory issues arise Windows system, advise store multiply imputed datasets, clean memory using rm gc make another run using settings. wrapper function combines output parLapply function ibind mice. mids object returned can used analyses. Note seed value desired, seed entered function argument seed. Seed values outside wrapper function (R-script passed mice) result reproducible results. refer manual parallel explanation matter.","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wrapper function that runs MICE in parallel — parlmice","text":"Schouten, R. Vink, G. (2017). parlmice: faster, paraleller, micer. https://www.gerkovink.com/parlMICE/Vignette_parlMICE.html Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/parlmice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper function that runs MICE in parallel — parlmice","text":"Gerko Vink, Rianne Schouten","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrapper function that runs MICE in parallel — parlmice","text":"","code":"# 150 imputations in dataset nhanes, performed by 3 cores if (FALSE) { # \\dontrun{ imp1 <- parlmice(data = nhanes, n.core = 3, n.imp.core = 50) # Making use of arguments in mice. imp2 <- parlmice(data = nhanes, method = \"norm.nob\", m = 100) imp2$method fit <- with(imp2, lm(bmi ~ hyp)) pool(fit) } # }"},{"path":"https://amices.org/mice/reference/pattern.html","id":null,"dir":"Reference","previous_headings":"","what":"Datasets with various missing data patterns — pattern","title":"Datasets with various missing data patterns — pattern","text":"Four simple datasets various missing data patterns","code":""},{"path":"https://amices.org/mice/reference/pattern.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Datasets with various missing data patterns — pattern","text":"list(\"pattern1\") Data univariate missing data pattern list(\"pattern2\") Data monotone missing data pattern list(\"pattern3\") Data file matching missing data pattern list(\"pattern4\") Data general missing data pattern Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/pattern.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Datasets with various missing data patterns — pattern","text":"Van Buuren (2012) uses four artificial datasets illustrate various missing data patterns.","code":""},{"path":"https://amices.org/mice/reference/pattern.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Datasets with various missing data patterns — pattern","text":"","code":"pattern4 #> A B C #> 25 26 88 32 #> 26 42 66 21 #> 27 86 54 NA #> 28 9 92 NA #> 29 20 83 NA #> 30 89 NA 41 #> 31 NA NA 35 #> 32 NA NA 33 data <- rbind(pattern1, pattern2, pattern3, pattern4) mdpat <- cbind(expand.grid(rec = 8:1, pat = 1:4, var = 1:3), r = as.numeric(as.vector(is.na(data)))) types <- c(\"Univariate\", \"Monotone\", \"File matching\", \"General\") tp41 <- lattice::levelplot(r ~ var + rec | as.factor(pat), data = mdpat, as.table = TRUE, aspect = \"iso\", shrink = c(0.9), col.regions = mdc(1:2), colorkey = FALSE, scales = list(draw = FALSE), xlab = \"\", ylab = \"\", between = list(x = 1, y = 0), strip = lattice::strip.custom( bg = \"grey95\", style = 1, factor.levels = types ) ) print(tp41) md.pattern(pattern4) #> A B C #> 2 1 1 1 0 #> 3 1 1 0 1 #> 1 1 0 1 1 #> 2 0 0 1 2 #> 2 3 3 8 p <- md.pairs(pattern4) p #> $rr #> A B C #> A 6 5 3 #> B 5 5 2 #> C 3 2 5 #> #> $rm #> A B C #> A 0 1 3 #> B 0 0 3 #> C 2 3 0 #> #> $mr #> A B C #> A 0 0 2 #> B 1 0 3 #> C 3 3 0 #> #> $mm #> A B C #> A 2 2 0 #> B 2 3 0 #> C 0 0 3 #> ### proportion of usable cases p$mr / (p$mr + p$mm) #> A B C #> A 0.0000000 0 1 #> B 0.3333333 0 1 #> C 1.0000000 1 0 ### outbound statistics p$rm / (p$rm + p$rr) #> A B C #> A 0.0 0.1666667 0.5 #> B 0.0 0.0000000 0.6 #> C 0.4 0.6000000 0.0 fluxplot(pattern2)"},{"path":"https://amices.org/mice/reference/plot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the trace lines of the MICE algorithm — plot.mids","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"Trace line plots portray value estimate iteration number. estimate can anything can calculate, typically chosen parameter scientific interest. plot method mids object plots mean standard deviation imputed (observed) values iteration number $m$ replications. default, function plot development mean standard deviation incomplete variable. convergence, streams intermingle free trend.","code":""},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"","code":"# S3 method for class 'mids' plot( x, y = NULL, theme = mice.theme(), layout = c(2, 3), type = \"l\", col = 1:10, lty = 1, ... )"},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"x object class mids y formula specifies variables, stream iterations plotted. omitted, streams, variables iterations plotted. theme trellis theme applied graphs. default mice.theme(). layout vector length 2 given number columns rows plot. default c(2, 3). type Parameter type panel.xyplot. col Parameter col panel.xyplot. lty Parameter lty panel.xyplot. ... Extra arguments xyplot.","code":""},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"object class \"trellis\".","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"Stef van Buuren 2011","code":""},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"","code":"imp <- mice(nhanes, print = FALSE) plot(imp, bmi + chl ~ .it | .ms, layout = c(2, 1))"},{"path":"https://amices.org/mice/reference/pmm.match.html","id":null,"dir":"Reference","previous_headings":"","what":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"function finds matches among observed data predictive mean metric. selects donors closest matches, randomly samples one donors, returns observed value match.","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"","code":".pmm.match(z, yhat = yhat, y = y, donors = 5, ...)"},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"z scalar containing predicted value current case imputed. yhat vector containing predicted values cases observed outcome. y vector length(yhat) elements containing observed outcome donors size donor pool among draw made. default donors = 5. Setting donors = 1 always selects closest match. Values 3 10 provide best results. Note: setting changed 3 5 version 2.19, based simulation work Tim Morris (UCL). ... parameters (used).","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"scalar containing observed value selected donor.","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"function included backward compatibility. used mice 2.21. current mice.impute.pmm() function calls faster C function matcher instead .pmm.match().","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"Schenker N & Taylor JMG (1996) Partially parametric techniques multiple imputation. Computational Statistics Data Analysis, 22, 425-446. Little RJA (1988) Missing-data adjustments large surveys (discussion). Journal Business Economics Statistics, 6, 287-301.","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models fitted to imputed data — pool.compare","title":"Compare two nested models fitted to imputed data — pool.compare","text":"function deprecated V3. Use D1 D3 instead.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models fitted to imputed data — pool.compare","text":"","code":"pool.compare(fit1, fit0, method = c(\"wald\", \"likelihood\"), data = NULL)"},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models fitted to imputed data — pool.compare","text":"fit1 object class 'mira', produced .mids(). fit0 object class 'mira', produced .mids(). model fit0 nested fit0 fit1. method Either \"wald\" \"likelihood\" specifying type comparison. default \"wald\". data longer used.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare two nested models fitted to imputed data — pool.compare","text":"list containing several components. Component call call pool.compare function. Component call11 call created fit1. Component call12 call created imputations. Component call01 call created fit0. Component call02 call created imputations. Components method method used compare two models: 'Wald' 'likelihood'. Component nmis number missing entries variable. Component m number imputations. Component qhat1 matrix, containing estimated coefficients m repeated complete data analyses fit1. Component qhat0 matrix, containing estimated coefficients m repeated complete data analyses fit0. Component ubar1 mean variances fit1, formula (3.1.3), Rubin (1987). Component ubar0 mean variances fit0, formula (3.1.3), Rubin (1987). Component qbar1 pooled estimate fit1, formula (3.1.2) Rubin (1987). Component qbar0 pooled estimate fit0, formula (3.1.2) Rubin (1987). Component Dm test statistic. Component rm relative increase variance due nonresponse, formula (3.1.7), Rubin (1987). Component df1: df1 = null hypothesis assumed Dm F distribution (df1,df2) degrees freedom. Component df2: df2. Component pvalue P-value testing whether model fit1 statistically different smaller fit0.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compare two nested models fitted to imputed data — pool.compare","text":"Compares two nested models m repeated complete data analysis function based article Meng Rubin (1992). Wald-method can found paragraph 2.2 likelihood method can found paragraph 3. One use Wald method comparison linear models obtained e.g. lm (.mids()). likelihood method used case logistic regression models obtained glm() .mids(). function assumes fit1 larger model, model fit0 fully contained fit1. case method='wald', null hypothesis tested extra parameters zero.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models fitted to imputed data — pool.compare","text":"Li, K.H., Meng, X.L., Raghunathan, T.E. Rubin, D. B. (1991). Significance levels repeated p-values multiply-imputed data. Statistica Sinica, 1, 65-92. Meng, X.L. Rubin, D.B. (1992). Performing likelihood ratio tests multiple-imputed data sets. Biometrika, 79, 103-111. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compare two nested models fitted to imputed data — pool.compare","text":"Karin Groothuis-Oudshoorn Stef van Buuren, 2009","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine estimates by pooling rules — pool","title":"Combine estimates by pooling rules — pool","text":"pool() function combines estimates m repeated complete data analyses. typical sequence steps perform multiple imputation analysis : Impute missing data mice() function, resulting multiple imputed data set (class mids); Fit model interest (scientific model) imputed data set () function, resulting object class mira; Pool estimates model single set estimates standard errors, resulting object class mipo; Optionally, compare pooled estimates different scientific models D1() D3() functions. common error reverse steps 2 3, .e., pool multiply-imputed data instead estimates. may severely bias estimates scientific interest yield incorrect statistical intervals p-values. pool() function detect case.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine estimates by pooling rules — pool","text":"","code":"pool(object, dfcom = NULL, rule = NULL, custom.t = NULL) pool.syn(object, dfcom = NULL, rule = \"reiter2003\")"},{"path":"https://amices.org/mice/reference/pool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine estimates by pooling rules — pool","text":"object object class mira (produced .mids() .mira()), list model fits. dfcom positive number representing degrees freedom complete-data analysis. Normally, number independent observation minus number fitted parameters. default (dfcom = NULL) extract information following order: 1) component residual.df returned glance() glance() function found, 2) result df.residual( applied first fitted model, 3) 999999. last case, warning \"Large sample assumed\" printed. degrees freedom incorrect, specify appropriate value manually. rule string indicating pooling rule. Currently supported \"rubin1987\" (default, missing data) \"reiter2003\" (synthetic data created complete data set). custom.t custom character string parsed calculation rule total variance t. custom rule can use calculated pooling statistics dimensions must come .data$. default t calculation form \".data$ubar + (1 + 1 / .data$m) * .data$b\". See examples example.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine estimates by pooling rules — pool","text":"object class mipo, stands 'multiple imputation pooled outcome'. rule \"reiter2003\" values lambda fmi set `NA`, statistics apply data synthesised fully observed data.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine estimates by pooling rules — pool","text":"pool() function averages estimates complete data model, computes total variance repeated analyses Rubin's rules (Rubin, 1987, p. 76), computes following diagnostic statistics per estimate: Relative increase variance due nonresponse r; Residual degrees freedom hypothesis testing df; Proportion total variance due missingness lambda; Fraction missing information fmi. degrees freedom calculation pooled estimates uses Barnard-Rubin adjustment small samples (Barnard Rubin, 1999). pool.syn() function combines estimates Reiter's partially synthetic data pooling rules (Reiter, 2003). combination rule assumes data synthesised completely observed. Pooling differs Rubin's method calculation total variance degrees freedom. Pooling requires following input fitted model: estimates model; standard error estimate; residual degrees freedom model. pool() pool.syn() functions rely broom::tidy broom::glance extracting parameters. Since mice 3.0+, broom package takes care filtering relevant parts complete-data analysis. may happen see messages like Error: tidy method objects class ... Error: glance method objects class .... message means complete-data method used (imp, ...) tidy glance method defined broom package. broom.mixed package contains tidy glance methods mixed models. using mixed model, first run library(broom.mixed) calling pool(). tidy glance methods defined analysis tabulate m parameter estimates variance estimates (square standard errors) m fitted models stored fit$analyses. parameter, run pool.scalar obtain pooled parameters estimate, variance, degrees freedom, relative increase variance fraction missing information. alternative write glance() tidy() methods add broom according specifications given https://broom.tidymodels.org. versions prior mice 3.0 pooling required coef() vcov() methods available fitted objects. feature longer supported. reason vcov() methods inconsistent across packages, leading buggy behaviour pool() function. Since mice 3.13.2 function pool() uses robust standard error estimate pooling can extract robust.se tidy() object.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Combine estimates by pooling rules — pool","text":"Barnard, J. Rubin, D.B. (1999). Small sample degrees freedom multiple imputation. Biometrika, 86, 948-955. Rubin, D.B. (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley Sons. Reiter, J.P. (2003). Inference Partially Synthetic, Public Use Microdata Sets. Survey Methodology, 29, 181-189. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine estimates by pooling rules — pool","text":"","code":"# impute missing data, analyse and pool using the classic MICE workflow imp <- mice(nhanes, maxit = 2, m = 2) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl fit <- with(data = imp, exp = lm(bmi ~ hyp + chl)) summary(pool(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 20.60793363 4.64881537 4.4329430 10.12935 0.001229288 #> 2 hyp 0.21992681 1.99646262 0.1101582 19.71919 0.913397289 #> 3 chl 0.02823202 0.02531475 1.1152403 11.47827 0.287552697 # generate fully synthetic data, analyse and pool imp <- mice(cars, maxit = 2, m = 2, where = matrix(TRUE, nrow(cars), ncol(cars)) ) #> #> iter imp variable #> 1 1 speed dist #> 1 2 speed dist #> 2 1 speed dist #> 2 2 speed dist fit <- with(data = imp, exp = lm(speed ~ dist)) summary(pool.syn(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 11.45981833 1.35768034 8.440734 9.843846 8.128227e-06 #> 2 dist 0.08662892 0.03546026 2.442986 2.896935 9.529340e-02 # use a custom pooling rule for the total variance about the estimate # e.g. use t = b + b/m instead of t = ubar + b + b/m imp <- mice(nhanes, maxit = 2, m = 2) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl fit <- with(data = imp, exp = lm(bmi ~ hyp + chl)) pool(fit, custom.t = \".data$b + .data$b / .data$m\") #> Class: mipo m = 2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 24.13311859 2.244648e+01 6.5406334371 9.8109501556 22 0 #> 2 hyp 2 -2.26888722 4.854083e+00 0.2991634667 0.4487452001 22 0 #> 3 chl 2 0.02693878 6.328178e-04 0.0001986903 0.0002980354 22 0 #> riv lambda fmi #> 1 0.43708196 1 0.7680485 #> 2 0.09244696 1 0.6948746 #> 3 0.47096565 1 0.7733915"},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":null,"dir":"Reference","previous_headings":"","what":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"function pools coefficients determination R^2 adjusted coefficients determination (R^2_a) obtained lm modeling function. pooling uses Fisher z-transformation.","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"","code":"pool.r.squared(object, adjusted = FALSE)"},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"object object class 'mira' 'mipo', produced lm.mids, .mids, pool lm modeling function. adjusted logical value. adjusted=TRUE adjusted R^2 calculated. default value FALSE.","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"Returns 1x4 table components. Component est pooled R^2 estimate. Component lo95 95 % lower bound pooled R^2. Component hi95 95 % upper bound pooled R^2. Component fmi fraction missing information due nonresponse.","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"Harel, O (2009). estimation R^2 adjusted R^2 incomplete data sets using multiple imputation, Journal Applied Statistics, 36:1109-1118. Rubin, D.B. (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley Sons. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"Karin Groothuis-Oudshoorn Stef van Buuren, 2009","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"","code":"imp <- mice(nhanes, print = FALSE, seed = 16117) fit <- with(imp, lm(chl ~ age + hyp + bmi)) # input: mira object pool.r.squared(fit) #> est lo 95 hi 95 fmi #> R^2 0.4338408 0.06503877 0.7513683 0.4176739 pool.r.squared(fit, adjusted = TRUE) #> est lo 95 hi 95 fmi #> adj R^2 0.3507643 0.01771032 0.7091501 0.4617807 # input: mipo object est <- pool(fit) pool.r.squared(est) #> est lo 95 hi 95 fmi #> R^2 0.4338408 0.06503877 0.7513683 0.4176739 pool.r.squared(est, adjusted = TRUE) #> est lo 95 hi 95 fmi #> adj R^2 0.3507643 0.01771032 0.7091501 0.4617807"},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiple imputation pooling: univariate version — pool.scalar","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Pools univariate estimates m repeated complete data analysis","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"","code":"pool.scalar(Q, U, n = Inf, k = 1, rule = c(\"rubin1987\", \"reiter2003\")) pool.scalar.syn(Q, U, n = Inf, k = 1, rule = \"reiter2003\")"},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Q vector univariate estimates m repeated complete data analyses. U vector containing corresponding m variances univariate estimates. n number providing sample size. nothing specified, infinite sample n = Inf assumed. k number indicating number parameters estimated. default, k = 1 assumed. rule string indicating pooling rule. Currently supported \"rubin1987\" (default, missing data) \"reiter2003\" (synthetic data created complete data set).","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Returns list components. m: Number imputations. qhat: m univariate estimates repeated complete-data analyses. u: corresponding m variances univariate estimates. qbar: pooled univariate estimate, formula (3.1.2) Rubin (1987). ubar: mean variances (.e. pooled within-imputation variance), formula (3.1.3) Rubin (1987). b: -imputation variance, formula (3.1.4) Rubin (1987). t: total variance pooled estimated, formula (3.1.5) Rubin (1987). r: relative increase variance due nonresponse, formula (3.1.7) Rubin (1987). df: degrees freedom t reference distribution method Barnard-Rubin (1999). fmi: fraction missing information due nonresponse, formula (3.1.10) Rubin (1987). (defined synthetic data.)","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"function averages univariate estimates complete data model, computes total variance repeated analyses, computes relative increase variance due missing data data synthesisation fraction missing information.","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Rubin, D.B. (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley Sons. Reiter, J.P. (2003). Inference Partially Synthetic, Public Use Microdata Sets. Survey Methodology, 29, 181-189.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Karin Groothuis-Oudshoorn Stef van Buuren, 2009; Thom Volker, 2021","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"","code":"# missing data imputation with with manual pooling imp <- mice(nhanes, maxit = 2, m = 2, print = FALSE, seed = 18210) fit <- with(data = imp, lm(bmi ~ age)) # manual pooling summary(fit$analyses[[1]]) #> #> Call: #> lm(formula = bmi ~ age) #> #> Residuals: #> Min 1Q Median 3Q Max #> -6.1587 -3.0674 0.9413 2.3870 8.7413 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 28.1043 1.8853 14.91 2.61e-13 *** #> age -1.5457 0.9723 -1.59 0.126 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 3.957 on 23 degrees of freedom #> Multiple R-squared: 0.099,\tAdjusted R-squared: 0.05983 #> F-statistic: 2.527 on 1 and 23 DF, p-value: 0.1255 #> summary(fit$analyses[[2]]) #> #> Call: #> lm(formula = bmi ~ age) #> #> Residuals: #> Min 1Q Median 3Q Max #> -7.3611 -3.6333 0.9389 2.3389 7.5389 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 29.189 2.019 14.460 4.92e-13 *** #> age -1.428 1.041 -1.371 0.183 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 4.236 on 23 degrees of freedom #> Multiple R-squared: 0.0756,\tAdjusted R-squared: 0.03541 #> F-statistic: 1.881 on 1 and 23 DF, p-value: 0.1835 #> pool.scalar(Q = c(-1.5457, -1.428), U = c(0.9723^2, 1.041^2), n = 25, k = 2) #> $m #> [1] 2 #> #> $qhat #> [1] -1.5457 -1.4280 #> #> $u #> [1] 0.9453673 1.0836810 #> #> $qbar #> [1] -1.48685 #> #> $ubar #> [1] 1.014524 #> #> $b #> [1] 0.006926645 #> #> $t #> [1] 1.024914 #> #> $df #> [1] 20.97025 #> #> $r #> [1] 0.01024122 #> #> $fmi #> [1] 0.09272831 #> # check: automatic pooling using broom pool(fit) #> Class: mipo m = 2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 28.646618 3.814682 0.588114658 4.696854 23 10.72144 #> 2 age 2 -1.486715 1.014543 0.006947187 1.024964 23 20.96937 #> riv lambda fmi #> 1 0.2312570 0.18782190 0.30620278 #> 2 0.0102714 0.01016697 0.09275848 # manual pooling for synthetic data created from complete data imp <- mice(cars, maxit = 2, m = 2, print = FALSE, seed = 18210, where = matrix(TRUE, nrow(cars), ncol(cars)) ) fit <- with(data = imp, lm(speed ~ dist)) # manual pooling: extract Q and U summary(fit$analyses[[1]]) #> #> Call: #> lm(formula = speed ~ dist) #> #> Residuals: #> Min 1Q Median 3Q Max #> -6.9740 -2.3144 -0.1494 3.1287 7.4115 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 10.15208 1.06236 9.556 1.10e-12 *** #> dist 0.12182 0.02121 5.744 6.15e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 3.618 on 48 degrees of freedom #> Multiple R-squared: 0.4074,\tAdjusted R-squared: 0.395 #> F-statistic: 33 on 1 and 48 DF, p-value: 6.147e-07 #> summary(fit$analyses[[2]]) #> #> Call: #> lm(formula = speed ~ dist) #> #> Residuals: #> Min 1Q Median 3Q Max #> -7.5830 -3.1680 -0.3479 3.3928 8.1902 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 9.46952 1.31136 7.221 3.37e-09 *** #> dist 0.13209 0.02516 5.250 3.43e-06 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 4.271 on 48 degrees of freedom #> Multiple R-squared: 0.3647,\tAdjusted R-squared: 0.3515 #> F-statistic: 27.56 on 1 and 48 DF, p-value: 3.428e-06 #> pool.scalar.syn(Q = c(0.12182, 0.13209), U = c(0.02121^2, 0.02516^2), n = 50, k = 2) #> $m #> [1] 2 #> #> $qhat #> [1] 0.12182 0.13209 #> #> $u #> [1] 0.0004498641 0.0006330256 #> #> $qbar #> [1] 0.126955 #> #> $ubar #> [1] 0.0005414448 #> #> $b #> [1] 5.273645e-05 #> #> $t #> [1] 0.0005678131 #> #> $df #> [1] 463.7127 #> #> $r #> [1] 0.1460992 #> #> $fmi #> [1] NA #> # check: automatic pooling using broom pool.syn(fit) #> Class: mipo m = 2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 9.8108000 1.4241330840 2.329428e-01 1.5406044600 48 174.9621 #> 2 dist 2 0.1269552 0.0005414288 5.273011e-05 0.0005677938 48 463.7928 #> riv lambda fmi #> 1 0.2453522 NA NA #> 2 0.1460860 NA NA"},{"path":"https://amices.org/mice/reference/pool.table.html","id":null,"dir":"Reference","previous_headings":"","what":"Combines estimates from a tidy table — pool.table","title":"Combines estimates from a tidy table — pool.table","text":"Combines estimates tidy table","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combines estimates from a tidy table — pool.table","text":"","code":"pool.table( w, type = c(\"all\", \"minimal\", \"tests\"), conf.int = TRUE, conf.level = 0.95, exponentiate = FALSE, dfcom = Inf, custom.t = NULL, rule = c(\"rubin1987\", \"reiter2003\"), ... )"},{"path":"https://amices.org/mice/reference/pool.table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combines estimates from a tidy table — pool.table","text":"w data.frame parameter estimates tidy format (see details). type string, either \"minimal\", \"tests\" \"\". Use minimal mimick output summary(pool(fit)). default \"\". conf.int Logical indicating whether include confidence interval. conf.level Confidence level interval, used conf.int = TRUE. Number 0 1. exponentiate Flag indicating whether exponentiate coefficient estimates confidence intervals (typical logistic regression). dfcom positive number representing degrees freedom residuals complete-data analysis. dfcom argument used Barnard-Rubin adjustment. linear regression, dfcom equivalent number independent observation minus number fitted parameters, expression becomes complex regularized, proportional hazards, semi-parametric techniques. used w lacks column named \"df.residual\". custom.t custom character string parsed calculation rule total variance t. custom rule can use calculated pooling statistics. default t calculation form \".data$ubar + (1 + 1 / .data$m) * .data$b\". rule string indicating pooling rule. Currently supported \"rubin1987\" (default, analyses applied multiply-imputed incomplete data) \"reiter2003\" (analyses applied synthetic data created complete data). ... Arguments passed ","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combines estimates from a tidy table — pool.table","text":"pool.table() returns data.frame aggregated estimates, standard errors, confidence intervals statistical tests. meaning columns follows:","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combines estimates from a tidy table — pool.table","text":"input data w data.frame columns named: Columns 1-3 obligatory. Column 4 optional. Usually, entries column 4 . user can omit column 4, specify argument pool.table(..., dfcom = ...) instead. given, column residual.df takes precedence. neither specified, mice tries calculate residual degrees freedom. fails (e.g. information sample size), mice sets dfcom = Inf. value dfcom = Inf acceptable large samples (n > 1000) relatively concise parametric models.","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combines estimates from a tidy table — pool.table","text":"","code":"# conventional mice workflow imp <- mice(nhanes2, m = 2, maxit = 2, seed = 1, print = FALSE) fit <- with(imp, lm(chl ~ age + bmi + hyp)) pld1 <- pool(fit) pld1$pooled #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 2.979488 3081.702712 16.77783124 3106.869459 20 18.09145 #> 2 age40-59 2 52.005346 367.726421 13.68301760 388.250947 20 16.49810 #> 3 age60-99 2 70.077449 498.129498 112.28149168 666.551735 20 7.29272 #> 4 bmi 2 6.006762 3.897692 0.02197335 3.930652 20 18.08472 #> 5 hypyes 2 -4.347543 408.567912 6.75735741 418.703948 20 17.63466 #> riv lambda fmi #> 1 0.008166507 0.008100355 0.1021574 #> 2 0.055814663 0.052864073 0.1500157 #> 3 0.338109344 0.252676917 0.3978908 #> 4 0.008456294 0.008385384 0.1024454 #> 5 0.024808694 0.024208122 0.1187861 # using pool.table() on tidy table tbl <- summary(fit)[, c(\"term\", \"estimate\", \"std.error\", \"df.residual\")] tbl #> # A tibble: 10 × 4 #> term estimate std.error df.residual #> #> 1 (Intercept) 0.0831 58.1 20 #> 2 age40-59 49.4 19.8 20 #> 3 age60-99 62.6 22.7 20 #> 4 bmi 5.90 2.07 20 #> 5 hypyes -2.51 22.1 20 #> 6 (Intercept) 5.88 52.8 20 #> 7 age40-59 54.6 18.6 20 #> 8 age60-99 77.6 21.9 20 #> 9 bmi 6.11 1.87 20 #> 10 hypyes -6.19 18.1 20 pld2 <- pool.table(tbl, type = \"minimal\") pld2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 2.979488 3081.702712 16.77783124 3106.869459 20 18.09145 #> 2 age40-59 2 52.005346 367.726421 13.68301760 388.250947 20 16.49810 #> 3 age60-99 2 70.077449 498.129498 112.28149168 666.551735 20 7.29272 #> 4 bmi 2 6.006762 3.897692 0.02197335 3.930652 20 18.08472 #> 5 hypyes 2 -4.347543 408.567912 6.75735741 418.703948 20 17.63466 #> riv lambda fmi #> 1 0.008166507 0.008100355 0.1021574 #> 2 0.055814663 0.052864073 0.1500157 #> 3 0.338109344 0.252676917 0.3978908 #> 4 0.008456294 0.008385384 0.1024454 #> 5 0.024808694 0.024208122 0.1187861 identical(pld1$pooled, pld2) #> [1] TRUE # conventional workflow: all numerical output all1 <- summary(pld1, type = \"all\", conf.int = TRUE) all1 #> term m estimate std.error statistic df p.value #> 1 (Intercept) 2 2.979488 55.739299 0.05345398 18.09145 0.957956041 #> 2 age40-59 2 52.005346 19.704085 2.63931807 16.49810 0.017526719 #> 3 age60-99 2 70.077449 25.817663 2.71432191 7.29272 0.028863238 #> 4 bmi 2 6.006762 1.982587 3.02975940 18.08472 0.007175381 #> 5 hypyes 2 -4.347543 20.462257 -0.21246647 17.63466 0.834179684 #> conf.low conf.high riv lambda fmi ubar #> 1 -114.082019 120.04099 0.008166507 0.008100355 0.1021574 3081.702712 #> 2 10.336814 93.67388 0.055814663 0.052864073 0.1500157 367.726421 #> 3 9.521628 130.63327 0.338109344 0.252676917 0.3978908 498.129498 #> 4 1.842899 10.17062 0.008456294 0.008385384 0.1024454 3.897692 #> 5 -47.401078 38.70599 0.024808694 0.024208122 0.1187861 408.567912 #> b t dfcom #> 1 16.77783124 3106.869459 20 #> 2 13.68301760 388.250947 20 #> 3 112.28149168 666.551735 20 #> 4 0.02197335 3.930652 20 #> 5 6.75735741 418.703948 20 # pool.table workflow: all numerical output all2 <- pool.table(tbl) all2 #> term m estimate std.error statistic df p.value #> 1 (Intercept) 2 2.979488 55.739299 0.05345398 18.09145 0.957956041 #> 2 age40-59 2 52.005346 19.704085 2.63931807 16.49810 0.017526719 #> 3 age60-99 2 70.077449 25.817663 2.71432191 7.29272 0.028863238 #> 4 bmi 2 6.006762 1.982587 3.02975940 18.08472 0.007175381 #> 5 hypyes 2 -4.347543 20.462257 -0.21246647 17.63466 0.834179684 #> conf.low conf.high riv lambda fmi ubar #> 1 -114.082019 120.04099 0.008166507 0.008100355 0.1021574 3081.702712 #> 2 10.336814 93.67388 0.055814663 0.052864073 0.1500157 367.726421 #> 3 9.521628 130.63327 0.338109344 0.252676917 0.3978908 498.129498 #> 4 1.842899 10.17062 0.008456294 0.008385384 0.1024454 3.897692 #> 5 -47.401078 38.70599 0.024808694 0.024208122 0.1187861 408.567912 #> b t dfcom #> 1 16.77783124 3106.869459 20 #> 2 13.68301760 388.250947 20 #> 3 112.28149168 666.551735 20 #> 4 0.02197335 3.930652 20 #> 5 6.75735741 418.703948 20 identical(data.frame(all1), all2) #> [1] TRUE"},{"path":"https://amices.org/mice/reference/popmis.html","id":null,"dir":"Reference","previous_headings":"","what":"Hox pupil popularity data with missing popularity scores — popmis","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"Hox pupil popularity data missing popularity scores","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"data frame 2000 rows 7 columns: pupil Pupil number within school school School number popular Pupil popularity 848 missing entries sex Pupil gender texp Teacher experience (years) const Constant intercept term teachpop Teacher popularity","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"Hox, J. J. (2002) Multilevel analysis. Techniques applications. Mahwah, NJ: Lawrence Erlbaum.","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"original, complete dataset generated Joop Hox example well-behaved multilevel data set. distributed data contains missing data pupil popularity.","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"","code":"popmis[1:3, ] #> pupil school popular sex texp const teachpop #> 1 1 1 NA 1 24 1 7 #> 2 2 1 NA 0 24 1 7 #> 3 3 1 7 1 24 1 6"},{"path":"https://amices.org/mice/reference/pops.html","id":null,"dir":"Reference","previous_headings":"","what":"Project on preterm and small for gestational age infants (POPS) — pops","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"Subset data POPS study, national, prospective study preterm children, including liveborn infants <32 weeks gestational age /<1500 g 1983 (n = 1338).","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"pops data frame 959 rows 86 columns. pops.pred 86 86 binary predictor matrix used specifying multiple imputation model.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"Hille, E. T. M., Elbertse, L., Bennebroek Gravenhorst, J., Brand, R., Verloove-Vanhorick, S. P. (2005). Nonresponse bias follow-study 19-year-old adolescents born preterm infants. Pediatrics, 116(5):662666. Hille, E. T. M., Weisglas-Kuperus, N., Van Goudoever, J. B., Jacobusse, G. W., Ens-Dokkum, M. H., De Groot, L., Wit, J. M., Geven, W. B., Kok, J. H., De Kleine, M. J. K., Kollee, L. . ., Mulder, . L. M., Van Straaten, H. L. M., De Vries, L. S., Van Weissenbruch, M. M., Verloove-Vanhorick, S. P. (2007). Functional outcomes participation young adulthood preterm low birth weight infants: Dutch project preterm small gestational age infants 19 years age. Pediatrics, 120(3):587595. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"data set concerns subset 959 children survived age 19 years. Hille et al (2005) divided 959 survivors three groups: Full responders (examined outpatient clinic completed questionnaires, n = 596), postal responders (completed mailed questionnaires, n = 109), non-responders (respond mailed requests telephone calls, traced, n = 254). Compared postal non-responders, full response group consists girls, contains Dutch children, higher educational social economic levels fewer handicaps. responders form highly selective subgroup total cohort. Multiple imputation data set described Hille et al (2007) Van Buuren (2012), chapter 8.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"dataset part mice.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"","code":"pops <- data(pops)"},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":null,"dir":"Reference","previous_headings":"","what":"Potthoff-Roy data — potthoffroy","title":"Potthoff-Roy data — potthoffroy","text":"Data Potthoff-Roy (1964) repeated measures dental fissures.","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Potthoff-Roy data — potthoffroy","text":"tbs data frame 27 rows 6 columns: id Person number sex Sex M/F d8 Distance age 8 years d10 Distance age 10 years d12 Distance age 12 years d14 Distance age 14 years","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Potthoff-Roy data — potthoffroy","text":"Potthoff, R. F., Roy, S. N. (1964). generalized multivariate analysis variance model usefully especially growth curve problems. Biometrika, 51(3), 313-326. Little, R. J. ., Rubin, D. B. (1987). Statistical Analysis Missing Data. New York: John Wiley & Sons. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Potthoff-Roy data — potthoffroy","text":"data set famous Potthoff-Roy data, used demonstrate MANOVA repeated measure data. Potthoff Roy (1964) published classic data study 16 boys 11 girls, ages 8, 10, 12, 14 distance (mm) center pituitary gland pteryomaxillary fissure measured. Changes pituitary-pteryomaxillary distances growth important orthodontic therapy. goals study describe distance boys girls simple functions age, compare functions boys girls. data reanalyzed many authors including Jennrich Schluchter (1986), Little Rubin (1987), Pinheiro Bates (2000), Verbeke Molenberghs (2000) Molenberghs Kenward (2007). See Chapter 9 Van Buuren (2012) challenging exercise using data.","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Potthoff-Roy data — potthoffroy","text":"","code":"### create missing values at age 10 as in Little and Rubin (1987) phr <- potthoffroy idmis <- c(3, 6, 9, 10, 13, 16, 23, 24, 27) phr[idmis, 4] <- NA phr #> id sex d8 d10 d12 d14 #> 1 1 F 21.0 20.0 21.5 23.0 #> 2 2 F 21.0 21.5 24.0 25.5 #> 3 3 F 20.5 NA 24.5 26.0 #> 4 4 F 23.5 24.5 25.0 26.5 #> 5 5 F 21.5 23.0 22.5 23.5 #> 6 6 F 20.0 NA 21.0 22.5 #> 7 7 F 21.5 22.5 23.0 25.0 #> 8 8 F 23.0 23.0 23.5 24.0 #> 9 9 F 20.0 NA 22.0 21.5 #> 10 10 F 16.5 NA 19.0 19.5 #> 11 11 F 24.5 25.0 28.0 28.0 #> 12 12 M 26.0 25.0 29.0 31.0 #> 13 13 M 21.5 NA 23.0 26.5 #> 14 14 M 23.0 22.5 24.0 27.5 #> 15 15 M 25.5 27.5 26.5 27.0 #> 16 16 M 20.0 NA 22.5 26.0 #> 17 17 M 24.5 25.5 27.0 28.5 #> 18 18 M 22.0 22.0 24.5 26.5 #> 19 19 M 24.0 21.5 24.5 25.5 #> 20 20 M 23.0 20.5 31.0 26.0 #> 21 21 M 27.5 28.0 31.0 31.5 #> 22 22 M 23.0 23.0 23.5 25.0 #> 23 23 M 21.5 NA 24.0 28.0 #> 24 24 M 17.0 NA 26.0 29.5 #> 25 25 M 22.5 25.5 25.5 26.0 #> 26 26 M 23.0 24.5 26.0 30.0 #> 27 27 M 22.0 NA 23.5 25.0 md.pattern(phr) #> id sex d8 d12 d14 d10 #> 18 1 1 1 1 1 1 0 #> 9 1 1 1 1 1 0 1 #> 0 0 0 0 0 9 9"},{"path":"https://amices.org/mice/reference/print.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a mids object — print.mids","title":"Print a mids object — print.mids","text":"Print mids object Print mira object Print mice.anova object Print summary.mice.anova object","code":""},{"path":"https://amices.org/mice/reference/print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a mids object — print.mids","text":"","code":"# S3 method for class 'mids' print(x, ...) # S3 method for class 'mira' print(x, ...) # S3 method for class 'mice.anova' print(x, ...) # S3 method for class 'mice.anova.summary' print(x, ...)"},{"path":"https://amices.org/mice/reference/print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a mids object — print.mids","text":"x Object class mids, mira mipo ... parameters passed print.default()","code":""},{"path":"https://amices.org/mice/reference/print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a mids object — print.mids","text":"NULL NULL NULL NULL","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/print.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a mads object — print.mads","title":"Print a mads object — print.mads","text":"Print mads object","code":""},{"path":"https://amices.org/mice/reference/print.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a mads object — print.mads","text":"","code":"# S3 method for class 'mads' print(x, ...)"},{"path":"https://amices.org/mice/reference/print.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a mads object — print.mads","text":"x Object class mads ... parameters passed print.default()","code":""},{"path":"https://amices.org/mice/reference/print.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a mads object — print.mads","text":"NULL","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/quickpred.html","id":null,"dir":"Reference","previous_headings":"","what":"Quick selection of predictors from the data — quickpred","title":"Quick selection of predictors from the data — quickpred","text":"Selects predictors according simple statistics","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quick selection of predictors from the data — quickpred","text":"","code":"quickpred( data, mincor = 0.1, minpuc = 0, include = \"\", exclude = \"\", method = \"pearson\" )"},{"path":"https://amices.org/mice/reference/quickpred.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quick selection of predictors from the data — quickpred","text":"data Matrix data frame incomplete data. mincor scalar, numeric vector (size ncol(data)) numeric matrix (square, size ncol(data) specifying minimum threshold(s) absolute correlation data compared. minpuc scalar, vector (size ncol(data)) matrix (square, size ncol(data) specifying minimum threshold(s) proportion usable cases. include string vector strings containing one variable names names(data). Variables specified always included predictor. exclude string vector strings containing one variable names names(data). Variables specified always excluded predictor. method string specifying type correlation. Use 'pearson' (default), 'kendall' 'spearman'. Can abbreviated.","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quick selection of predictors from the data — quickpred","text":"square binary matrix size ncol(data).","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quick selection of predictors from the data — quickpred","text":"function creates predictor matrix using variable selection procedure described Van Buuren et al.~(1999, p.~687–688). function designed aid setting good imputation model data many variables. Basic workings: procedure calculates variable pair (.e. target-predictor pair) two correlations using available cases per pair. first correlation uses values target predictor directly. second correlation uses (binary) response indicator target values predictor. largest (absolute value) correlations exceeds mincor, predictor added imputation set. default value mincor 0.1. addition, procedure eliminates predictors whose proportion usable cases fails meet minimum specified minpuc. default value 0, predictors retained even usable case. Finally, procedure includes predictors named include argument (useful background variables like age sex) eliminates predictor named exclude argument. variable listed include exclude arguments, include argument takes precedence. Advanced topic: mincor minpuc typically specified scalars, vectors squares matrices appropriate size also work. element vector corresponds row predictor matrix, procedure can effectively differentiate different target variables. Setting high values can useful auxiliary, less important, variables. set predictor variables can remain relatively small. Using square matrix extends idea columns, one can also apply cellwise thresholds.","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Quick selection of predictors from the data — quickpred","text":"quickpred() uses data.matrix convert factors numbers internal codes. Especially unordered factors resulting quantification may make sense.","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quick selection of predictors from the data — quickpred","text":"van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. van Buuren, S. Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/quickpred.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Quick selection of predictors from the data — quickpred","text":"Stef van Buuren, Aug 2009","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quick selection of predictors from the data — quickpred","text":"","code":"# default: include all predictors with absolute correlation over 0.1 quickpred(nhanes) #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 1 1 #> hyp 1 0 0 1 #> chl 1 1 1 0 # all predictors with absolute correlation over 0.4 quickpred(nhanes, mincor = 0.4) #> age bmi hyp chl #> age 0 0 0 0 #> bmi 0 0 0 0 #> hyp 1 0 0 1 #> chl 1 0 1 0 # include age and bmi, exclude chl quickpred(nhanes, mincor = 0.4, inc = c(\"age\", \"bmi\"), exc = \"chl\") #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 0 0 #> hyp 1 1 0 0 #> chl 1 1 1 0 # only include predictors with at least 30% usable cases quickpred(nhanes, minpuc = 0.3) #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 0 0 #> hyp 1 0 0 0 #> chl 1 1 1 0 # use low threshold for bmi, and high thresholds for hyp and chl pred <- quickpred(nhanes, mincor = c(0, 0.1, 0.5, 0.5)) pred #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 1 1 #> hyp 1 0 0 0 #> chl 1 0 0 0 # use it directly from mice imp <- mice(nhanes, pred = quickpred(nhanes, minpuc = 0.25, include = \"age\")) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl"},{"path":"https://amices.org/mice/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. dplyr filter generics glance, tidy","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":null,"dir":"Reference","previous_headings":"","what":"Self-reported and measured BMI — selfreport","title":"Self-reported and measured BMI — selfreport","text":"Dataset containing height weight data (measured, self-reported) two studies.","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Self-reported and measured BMI — selfreport","text":"data frame 2060 rows 15 variables: src Study, either krul mgg (factor) id Person identification number pop Population, NL (factor) age Age respondent years sex Sex respondent (factor) hm Height measured (cm) wm Weight measured (kg) hr Height reported (cm) wr Weight reported (kg) prg Pregnancy (factor), pregnant edu Educational level (factor) etn Ethnicity (factor) web Obtained web survey (factor) bm BMI measured (kg/m2) br BMI reported (kg/m2)","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Self-reported and measured BMI — selfreport","text":"Krul, ., Daanen, H. . M., Choi, H. (2010). Self-reported measured weight, height body mass index (BMI) Italy, Netherlands North America. European Journal Public Health, 21(4), 414-419. Van Keulen, H.M.,, Chorus, .M.J., Verheijden, M.W. (2011). Monitor Convenant Gezond Gewicht Nulmeting (determinanten van) beweeg- en eetgedrag van kinderen (4-11 jaar), jongeren (12-17 jaar) en volwassenen (18+ jaar). TNO/LS 2011.016. Leiden: TNO. Van der Klauw, M., Van Keulen, H.M., Verheijden, M.W. (2011). Monitor Convenant Gezond Gewicht Beweeg- en eetgedrag van kinderen (4-11 jaar), jongeren (12-17 jaar) en volwassenen (18+ jaar) 2010 en 2011. TNO/LS 2011.055. Leiden: TNO. (Dutch) Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Self-reported and measured BMI — selfreport","text":"dataset combines two datasets: krul data (Krul, 2010) (1257 persons) mgg data (Van Keulen 2011; Van der Klauw 2011) (803 persons). krul dataset contains height weight (measures self-reported) 1257 Dutch adults, whereas mgg dataset contains self-reported height weight 803 Dutch adults. Section 7.3 Van Buuren (2012) shows missing measured data can imputed mgg data, corrected prevalence estimates can calculated.","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Self-reported and measured BMI — selfreport","text":"","code":"md.pattern(selfreport[, c(\"age\", \"sex\", \"hm\", \"hr\", \"wm\", \"wr\")]) #> age sex hr wr hm wm #> 1257 1 1 1 1 1 1 0 #> 803 1 1 1 1 0 0 2 #> 0 0 0 0 803 803 1606 ### FIMD Section 7.3.5 Application bmi <- function(h, w) { return(w / (h / 100)^2) } init <- mice(selfreport, maxit = 0) #> Warning: Number of logged events: 2 meth <- init$meth meth[\"bm\"] <- \"~bmi(hm,wm)\" pred <- init$pred pred[, c(\"src\", \"id\", \"web\", \"bm\", \"br\")] <- 0 imp <- mice(selfreport, pred = pred, meth = meth, seed = 66573, maxit = 2, m = 1) #> #> iter imp variable #> 1 1 hm wm edu etn bm #> Error in bmi(hm, wm): could not find function \"bmi\" ## imp <- mice(selfreport, pred=pred, meth=meth, seed=66573, maxit=20, m=10) ### Like FIMD Figure 7.6 cd <- complete(imp, 1) #> Error: object 'imp' not found xy <- xy.coords(cd$bm, cd$br - cd$bm) #> Error: object 'cd' not found plot(xy, col = mdc(2), xlab = \"Measured BMI\", ylab = \"Reported - Measured BMI\", xlim = c(17, 45), ylim = c(-5, 5), type = \"n\", lwd = 0.7 ) #> Error: object 'xy' not found polygon(x = c(30, 20, 30), y = c(0, 10, 10), col = \"grey95\", border = NA) polygon(x = c(30, 40, 30), y = c(0, -10, -10), col = \"grey95\", border = NA) abline(0, 0, lty = 2, lwd = 0.7) idx <- cd$src == \"krul\" #> Error: object 'cd' not found xyc <- xy #> Error: object 'xy' not found xyc$x <- xy$x[idx] #> Error: object 'xy' not found xyc$y <- xy$y[idx] #> Error: object 'xy' not found xys <- xy #> Error: object 'xy' not found xys$x <- xy$x[!idx] #> Error: object 'xy' not found xys$y <- xy$y[!idx] #> Error: object 'xy' not found points(xyc, col = mdc(1), cex = 0.7) #> Error: object 'xyc' not found points(xys, col = mdc(2), cex = 0.7) #> Error: object 'xys' not found lines(lowess(xyc), col = mdc(4), lwd = 2) #> Error: object 'xyc' not found lines(lowess(xys), col = mdc(5), lwd = 2) #> Error: object 'xys' not found text(1:4, x = c(40, 28, 20, 32), y = c(4, 4, -4, -4), cex = 3) box(lwd = 1)"},{"path":"https://amices.org/mice/reference/squeeze.html","id":null,"dir":"Reference","previous_headings":"","what":"Squeeze the imputed values to be within specified boundaries. — squeeze","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"function replaces values x lower bounds[1] bounds[1], replaces values higher bounds[2] bounds[2].","code":""},{"path":"https://amices.org/mice/reference/squeeze.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"","code":"squeeze(x, bounds = c(min(x[r]), max(x[r])), r = rep.int(TRUE, length(x)))"},{"path":"https://amices.org/mice/reference/squeeze.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"x numerical vector values bounds numerical vector length 2 containing lower upper bounds. default, bounds minimum maximum values x. r logical vector length length(x) used select subset x calculating automatic bounds.","code":""},{"path":"https://amices.org/mice/reference/squeeze.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"vector length length(x).","code":""},{"path":"https://amices.org/mice/reference/squeeze.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"Stef van Buuren, 2011.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Stripplot of observed and imputed data — stripplot.mids","title":"Stripplot of observed and imputed data — stripplot.mids","text":"Plotting methods imputed data using lattice. stripplot produces one-dimensional scatterplots. function automatically separates observed imputed data. functions extend usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stripplot of observed and imputed data — stripplot.mids","text":"","code":"# S3 method for class 'mids' stripplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, theme = mice.theme(), allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), panel = lattice::lattice.getOption(\"panel.stripplot\"), default.prepanel = lattice::lattice.getOption(\"prepanel.default.stripplot\"), jitter.data = TRUE, horizontal = FALSE, ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stripplot of observed and imputed data — stripplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. convenience, stripplot() bwplot formula y~.imp may abbreviated y. applies single y, (yet) work y1+y2~.imp. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. panel See xyplot. default.prepanel See xyplot. jitter.data See panel.xyplot. horizontal See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stripplot of observed and imputed data — stripplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Stripplot of observed and imputed data — stripplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Stripplot of observed and imputed data — stripplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Stripplot of observed and imputed data — stripplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Stripplot of observed and imputed data — stripplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stripplot of observed and imputed data — stripplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg ### stripplot, all numerical variables if (FALSE) { # \\dontrun{ stripplot(imp) } # } ### same, but with improved display if (FALSE) { # \\dontrun{ stripplot(imp, col = c(\"grey\", mdc(2)), pch = c(1, 20)) } # } ### distribution per imputation of height, weight and bmi ### labeled by their own missingness if (FALSE) { # \\dontrun{ stripplot(imp, hgt + wgt + bmi ~ .imp, cex = c(2, 4), pch = c(1, 20), jitter = FALSE, layout = c(3, 1) ) } # } ### same, but labeled with the missingness of wgt (just four cases) if (FALSE) { # \\dontrun{ stripplot(imp, hgt + wgt + bmi ~ .imp, na = wgt, cex = c(2, 4), pch = c(1, 20), jitter = FALSE, layout = c(3, 1) ) } # } ### distribution of age and height, labeled by missingness in height ### most height values are missing for those around ### the age of two years ### some additional missings occur in region WEST if (FALSE) { # \\dontrun{ stripplot(imp, age + hgt ~ .imp | reg, hgt, col = c(grDevices::hcl(0, 0, 40, 0.2), mdc(2)), pch = c(1, 20) ) } # } ### heavily jitted relation between two categorical variables ### labeled by missingness of gen ### aggregated over all imputed data sets if (FALSE) { # \\dontrun{ stripplot(imp, gen ~ phb, factor = 2, cex = c(8, 1), hor = TRUE) } # } ### circle fun stripplot(imp, gen ~ .imp, na = wgt, factor = 2, cex = c(8.6), hor = FALSE, outer = TRUE, scales = \"free\", pch = c(1, 19) )"},{"path":"https://amices.org/mice/reference/summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of a mira object — summary.mira","title":"Summary of a mira object — summary.mira","text":"Summary mira object Summary mids object Summary mads object Print mice.anova object","code":""},{"path":"https://amices.org/mice/reference/summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of a mira object — summary.mira","text":"","code":"# S3 method for class 'mira' summary(object, type = c(\"tidy\", \"glance\", \"summary\"), ...) # S3 method for class 'mids' summary(object, ...) # S3 method for class 'mads' summary(object, ...) # S3 method for class 'mice.anova' summary(object, ...)"},{"path":"https://amices.org/mice/reference/summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of a mira object — summary.mira","text":"object mira object type length-1 character vector indicating type summary. three choices: type = \"tidy\" return parameters estimates analyses data frame. type = \"glance\" return fit statistics analysis data frame. type = \"summary\" returns list length m analysis results. default \"tidy\". ... parameters passed print() summary()","code":""},{"path":"https://amices.org/mice/reference/summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of a mira object — summary.mira","text":"NULL NULL NULL NULL","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":null,"dir":"Reference","previous_headings":"","what":"Supports semi-transparent foreground colors? — supports.transparent","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"function used mdc() find whether current device supports semi-transparent foreground colors.","code":""},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"","code":"supports.transparent()"},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"TRUE FALSE","code":""},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"function calls function dev.capabilities() package grDevices. function return FALSE status current device unknown.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"","code":"supports.transparent() #> [1] TRUE"},{"path":"https://amices.org/mice/reference/tbc.html","id":null,"dir":"Reference","previous_headings":"","what":"Terneuzen birth cohort — tbc","title":"Terneuzen birth cohort — tbc","text":"Data subset Terneuzen Birth Cohort data child growth.","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Terneuzen birth cohort — tbc","text":"tbs data frame 3951 rows 11 columns: id Person number occ Occasion number nocc Number occasions first first record person? (TRUE/FALSE) typ Type data (observed) age Age (years) sex Sex 1=M, 2=F hgt.z Height Z-score wgt.z Weight Z-score bmi.z BMI Z-score ao Adult overweight (0=, 1=yes) tbc.target data frame 2612 rows 3 columns: id Person number ao Adult overweight (0=, 1=yes) bmi.z.jv BMI Z-score young adult (18-29 years)","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Terneuzen birth cohort — tbc","text":"De Kroon, M. L. ., Renders, C. M., Kuipers, E. C., van Wouwe, J. P., van Buuren, S., de Jonge, G. ., Hirasing, R. . (2008). Identifying metabolic syndrome without blood tests young adults - Terneuzen birth cohort. European Journal Public Health, 18(6), 656-660. De Kroon, M. L. ., Renders, C. M., Van Wouwe, J. P., Van Buuren, S., Hirasing, R. . (2010). Terneuzen birth cohort: BMI changes 2 6 years correlate strongest adult overweight. PLoS ONE, 5(2), e9155. De Kroon, M. L. . (2011). Terneuzen Birth Cohort. Detection Prevention Overweight Cardiometabolic Risk Infancy Onward. Dissertation, Vrije Universiteit, Amsterdam. https://research.vu.nl/en/publications/-terneuzen-birth-cohort-detection--prevention--overweight Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Terneuzen birth cohort — tbc","text":"tbc data set random subset persons much larger collection data Terneuzen Birth Cohort. total cohort comprises 2604 unique persons, whereas subset tbc covers 306 persons. tbc.target auxiliary data set containing two outcomes adult age. details, see De Kroon et al (2008, 2010, 2011). imputation methodology explained Chapter 9 Van Buuren (2012).","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Terneuzen birth cohort — tbc","text":"","code":"data <- tbc md.pattern(data) #> id occ nocc first typ age sex wgt.z hgt.z bmi.z ao #> 1202 1 1 1 1 1 1 1 1 1 1 1 0 #> 1886 1 1 1 1 1 1 1 1 1 1 0 1 #> 331 1 1 1 1 1 1 1 1 0 0 1 2 #> 522 1 1 1 1 1 1 1 1 0 0 0 3 #> 3 1 1 1 1 1 1 1 0 1 0 1 2 #> 7 1 1 1 1 1 1 1 0 1 0 0 3 #> 0 0 0 0 0 0 0 10 853 863 2415 4141"},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy method to extract results from a `mipo` object — tidy.mipo","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"Tidy method extract results `mipo` object","code":""},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"","code":"# S3 method for class 'mipo' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"x object class mipo conf.int Logical. confidence intervals returned? conf.level Confidence level intervals. Defaults .95 ... extra arguments (used)","code":""},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"dataframe withh columns: term estimate ubar b t dfcom df riv lambda fmi p.value conf.low (called conf.int = TRUE) conf.high (called conf.int = TRUE)","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":null,"dir":"Reference","previous_headings":"","what":"Toenail data — toenail","title":"Toenail data — toenail","text":"toenail data come Multicenter study comparing two oral treatments toenail infection. Patients evaluated degree separation nail. Patients randomized two treatments followed seven visits - four first year yearly thereafter. patients treated prior first visit regarded baseline.","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Toenail data — toenail","text":"data frame 1908 observations following 5 variables: ID numeric vector giving ID patient outcome numeric vector giving response (0=none mild seperation, 1=moderate severe) treatment numeric vector giving treatment group month numeric vector giving time visit (exactly monthly intervals hence round numbers) visit numeric vector giving number visit","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Toenail data — toenail","text":"De Backer, M., De Vroey, C., Lesaffre, E., Scheys, ., De Keyser, P. (1998). Twelve weeks continuous oral therapy toenail onychomycosis caused dermatophytes: double-blind comparative trial terbinafine 250 mg/day versus itraconazole 200 mg/day. Journal American Academy Dermatology, 38, 57-63.","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Toenail data — toenail","text":"dataset copied DPpackage, scheduled discontinued CRAN August 2019.","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Toenail data — toenail","text":"Lesaffre, E. Spiessens, B. (2001). effect number quadrature points logistic random-effects model: example. Journal Royal Statistical Society, Series C, 50, 325-335. G. Fitzmaurice, N. Laird J. Ware (2004) Applied Longitudinal Analysis, Wiley Sons, New York, USA. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/toenail2.html","id":null,"dir":"Reference","previous_headings":"","what":"Toenail data — toenail2","title":"Toenail data — toenail2","text":"toenail data come Multicenter study comparing two oral treatments toenail infection. Patients evaluated degree separation nail. Patients randomized two treatments followed seven visits - four first year yearly thereafter. patients treated prior first visit regarded baseline.","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Toenail data — toenail2","text":"data frame 1908 observations following 5 variables: patientID numeric vector giving ID patient outcome factor 2 levels giving response treatment factor 2 levels giving treatment group time numeric vector giving time visit (exactly monthly intervals hence round numbers) visit integer giving number visit","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Toenail data — toenail2","text":"De Backer, M., De Vroey, C., Lesaffre, E., Scheys, ., De Keyser, P. (1998). Twelve weeks continuous oral therapy toenail onychomycosis caused dermatophytes: double-blind comparative trial terbinafine 250 mg/day versus itraconazole 200 mg/day. Journal American Academy Dermatology, 38, 57-63.","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Toenail data — toenail2","text":"Apart formatting, dataset identical toenail. formatting taken identical data(\"toenail\", package = \"HSAUR3\").","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Toenail data — toenail2","text":"Lesaffre, E. Spiessens, B. (2001). effect number quadrature points logistic random-effects model: example. Journal Royal Statistical Society, Series C, 50, 325-335. G. Fitzmaurice, N. Laird J. Ware (2004) Applied Longitudinal Analysis, Wiley Sons, New York, USA. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/version.html","id":null,"dir":"Reference","previous_headings":"","what":"Echoes the package version number — version","title":"Echoes the package version number — version","text":"Echoes package version number","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Echoes the package version number — version","text":"","code":"version(pkg = \"mice\")"},{"path":"https://amices.org/mice/reference/version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Echoes the package version number — version","text":"pkg character vector package name.","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Echoes the package version number — version","text":"character vector containing package name, version number installed directory.","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Echoes the package version number — version","text":"Stef van Buuren, Oct 2010","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Echoes the package version number — version","text":"","code":"version() #> [1] \"mice 3.16.16 2024-10-16 /home/runner/work/_temp/Library\" version(\"base\") #> [1] \"base 4.4.1 /opt/R/4.4.1/lib/R/library\""},{"path":"https://amices.org/mice/reference/walking.html","id":null,"dir":"Reference","previous_headings":"","what":"Walking disability data — walking","title":"Walking disability data — walking","text":"Two items YA YB measuring walking disability samples , B E.","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Walking disability data — walking","text":"data frame 890 rows following 5 variables: sex Sex respondent (factor) age Age respondent YA Item administered samples E (factor) YB Item administered samples B E (factor) src Source: Sample , B E (factor)","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Walking disability data — walking","text":"Example dataset demonstrate imputation two items (YA YB). Item YA administered sample sample E, item YB administered sample B sample E, sample E acts bridge study. Imputation using bridge study better simple equating imputation independence. Item YA corresponds HAQ8 item, item YB corresponds GAR9 items Van Buuren et al (2005). Sample E (well sample B) Euridiss study (n=292), sample ERGOPLUS study (n=306). See Van Buuren (2018) section 9.4 details imputation methodology.","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Walking disability data — walking","text":"van Buuren, S., Eyres, S., Tennant, ., Hopman-Rock, M. (2005). Improving comparability existing data Response Conversion. Journal Official Statistics, 21(1), 53-72. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Walking disability data — walking","text":"","code":"md.pattern(walking) #> sex age src YA YB #> 290 1 1 1 1 1 0 #> 300 1 1 1 1 0 1 #> 294 1 1 1 0 1 1 #> 6 1 1 1 0 0 2 #> 0 0 0 300 306 606 micemill <- function(n) { for (i in 1:n) { imp <<- mice.mids(imp) # global assignment cors <- with(imp, cor(as.numeric(YA), as.numeric(YB), method = \"kendall\" )) tau <<- rbind(tau, getfit(cors, s = TRUE)) # global assignment } } plotit <- function() { matplot( x = 1:nrow(tau), y = tau, ylab = expression(paste(\"Kendall's \", tau)), xlab = \"Iteration\", type = \"l\", lwd = 1, lty = 1:10, col = \"black\" ) } tau <- NULL imp <- mice(walking, max = 0, m = 10, seed = 92786) pred <- imp$pred pred[, c(\"src\", \"age\", \"sex\")] <- 0 imp <- mice(walking, max = 0, m = 3, seed = 92786, pred = pred) micemill(5) #> #> iter imp variable #> 1 1 YA YB #> 1 2 YA YB #> 1 3 YA YB #> #> iter imp variable #> 2 1 YA YB #> 2 2 YA YB #> 2 3 YA YB #> #> iter imp variable #> 3 1 YA YB #> 3 2 YA YB #> 3 3 YA YB #> #> iter imp variable #> 4 1 YA YB #> 4 2 YA YB #> 4 3 YA YB #> #> iter imp variable #> 5 1 YA YB #> 5 2 YA YB #> 5 3 YA YB plotit() ### to get figure 9.8 van Buuren (2018) use m=10 and micemill(20)"},{"path":"https://amices.org/mice/reference/windspeed.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset of Irish wind speed data — windspeed","title":"Subset of Irish wind speed data — windspeed","text":"Subset Irish wind speed data","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Subset of Irish wind speed data — windspeed","text":"data frame 433 rows 6 columns containing daily average wind speeds within period 1961-1978 meteorological stations Republic Ireland. data random sample larger data set. RochePt Roche Point Rosslare Rosslare Shannon Shannon Dublin Dublin Clones Clones MalinHead Malin Head","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset of Irish wind speed data — windspeed","text":"original data set much larger analyzed detail Haslett Raftery (1989). Van Buuren et al (2006) used subset investigate influence extreme MAR mechanisms quality imputation.","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Subset of Irish wind speed data — windspeed","text":"Haslett, J. Raftery, . E. (1989). Space-time Modeling Long-memory Dependence: Assessing Ireland's Wind Power Resource (Discussion). Applied Statistics 38, 1-50. http://lib.stat.cmu.edu/datasets/wind.desc http://lib.stat.cmu.edu/datasets/wind.data van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064.","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset of Irish wind speed data — windspeed","text":"","code":"windspeed[1:3, ] #> RochePt Rosslare Shannon Dublin Clones MalinHead #> 1 4.92 7.29 3.67 3.71 2.71 7.83 #> 2 22.50 19.41 16.13 16.08 16.58 19.67 #> 3 7.54 9.29 11.00 1.71 9.71 15.37"},{"path":"https://amices.org/mice/reference/with.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate an expression in multiple imputed datasets — with.mids","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"Performs computation imputed datasets data.","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"","code":"# S3 method for class 'mids' with(data, expr, ...)"},{"path":"https://amices.org/mice/reference/with.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"data object type mids, stands 'multiply imputed data set', typically created call function mice(). expr expression evaluate imputed data set. Formula's containing dot (notation \"variables\") work. ... used","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"object S3 class mira","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"Version 3.11.10 changed tidy evaluation quosure. change affect code worked previous versions. turned latter statement true (#292). Version 3.12.2 reverts old () function.","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/with.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"Karin Oudshoorn, Stef van Buuren 2009, 2012, 2020","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"","code":"imp <- mice(nhanes2, m = 2, print = FALSE, seed = 14221) # descriptive statistics getfit(with(imp, table(hyp, age))) #> Component 1 : #> age #> hyp 20-39 40-59 60-99 #> no 12 4 3 #> yes 0 3 3 #> #> Component 2 : #> age #> hyp 20-39 40-59 60-99 #> no 11 4 4 #> yes 1 3 2 #> # model fitting and testing fit1 <- with(imp, lm(bmi ~ age + hyp + chl)) fit2 <- with(imp, glm(hyp ~ age + chl, family = binomial)) fit3 <- with(imp, anova(lm(bmi ~ age + chl)))"},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"Plotting method investigate relation amputed data weighted sum scores. Based lattice. xyplot produces scatterplots. function plots variables weighted sum scores. function automatically separates amputed non-amputed data see relation amputation weighted sum scores.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"","code":"# S3 method for class 'mads' xyplot( x, data, which.pat = NULL, standardized = TRUE, layout = NULL, colors = mdc(1:2), ... )"},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"x mads object, typically created ampute. data string vector variable names needs plotted. default, variables plotted. .pat scalar vector indicating patterns need plotted. default, patterns plotted. standardized Logical. Whether scatterplots need created standardized data . Default TRUE. layout vector two values indicating scatterplots one pattern divided plot. example, c(2, 3) indicates scatterplots six variables need placed 3 rows 2 columns. several defaults different #variables. Note 9 variables, multiple plots created automatically. colors vector two RGB values defining colors non-amputed amputed data respectively. RGB values can obtained hcl. ... used, consistency generic","code":""},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"list containing scatterplots. Note new pattern always shown new plot.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"mads object contains information need make desired plots. Check mads-class vignette Multivariate Amputation using Ampute understand contents class object mads.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Scatterplot of observed and imputed data — xyplot.mids","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"Plotting methods imputed data using lattice. xyplot() produces conditional scatterplots. function automatically separates observed (blue) imputed (red) data. function extends usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"","code":"# S3 method for class 'mids' xyplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, theme = mice.theme(), allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg # xyplot: scatterplot by imputation number # observe the erroneous outlying imputed values # (caused by imputing hgt from bmi) xyplot(imp, hgt ~ age | .imp, pch = c(1, 20), cex = c(1, 1.5)) # same, but label with missingness of wgt (four cases) xyplot(imp, hgt ~ age | .imp, na.group = wgt, pch = c(1, 20), cex = c(1, 1.5))"},{"path":"https://amices.org/mice/news/index.html","id":"mice-31616","dir":"Changelog","previous_headings":"","what":"mice 3.16.16","title":"mice 3.16.16","text":"Prevent .mids() filling imp object complete variables","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31615","dir":"Changelog","previous_headings":"","what":"mice 3.16.15","title":"mice 3.16.15","text":"Initialize single-variables blocks make.method() efficient way (resolves #672)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31614","dir":"Changelog","previous_headings":"","what":"mice 3.16.14","title":"mice 3.16.14","text":"Fixes bug initialization factor values","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31613","dir":"Changelog","previous_headings":"","what":"mice 3.16.13","title":"mice 3.16.13","text":"Adds support literanger package rf imputation twice fast ranger (#648). Thanks @stephematician contribution.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31612","dir":"Changelog","previous_headings":"","what":"mice 3.16.12","title":"mice 3.16.12","text":"Fixes installation problem Rprofile prints stdout Fedora, R version 4.1.3 (#646, #647). Thanks @brookslogan fix.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31611","dir":"Changelog","previous_headings":"","what":"mice 3.16.11","title":"mice 3.16.11","text":"Repairs lost braces documentation","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31610","dir":"Changelog","previous_headings":"","what":"mice 3.16.10","title":"mice 3.16.10","text":"Adds support non-syntactic variables names backticks (#631)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3169","dir":"Changelog","previous_headings":"","what":"mice 3.16.9","title":"mice 3.16.9","text":"Fixes problem minpuc argument quickpred() (#634) Fixes coef() available S4 object using lavaan (#615, #616) Adds .github/dependabot.yml configuration automate daily check (#598) Update documentation tags roxygen2 7.3.1 requirements","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3168","dir":"Changelog","previous_headings":"","what":"mice 3.16.8","title":"mice 3.16.8","text":"Fixes problems zero predictors (#588)","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-7","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.7","text":"Solves problem package documentation link Simplifies NEWS.md formatting get correct version sequence CRAN -package NEWS","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-6","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.6","text":"Prepares deprecation blocks argument various places Removes need blocks initialize_chain() rbind(), formulas concatenated duplicate names found, also rename duplicated variables formulas new name","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.6","text":"Fixes bug filter.mids() incorrectly removed empty components imp object Fixes bug ibind() incorrectly used length(blocks) first dimension chainMean chainVar objects Corrects description visitSequence, chainMean chainVar components mids object","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.5","text":"Patches bug complete() auto-repeated imputed values cells imputed (occurred special case rbind(), first set rows imputed second ). Replaces internal variable type informative pred (currently active row predictorMatrix)","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-4","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.4","text":"Imputing categorical data predictive mean matching. Predictive mean matching (PMM) default method mice() imputing numerical variables, long possible impute factors. enhancement introduces better support work categorical variables PMM. former system translated factors integers ynum <- .integer(f). However, order integers ynum may sensible interpretation unordered factor. new system quantifies ynum yield better results higher R2R^2. method calculates canonical correlation y (dummy matrix) linear combination imputation model predictors x. algorithm replaces category y single number taken first canonical variate. step, imputation model fitted, predicted values model extracted function similarity measure matching step. method works ordered unordered factors. special precautions taken ensure monotonicity category numbers quantifications, method able preserve quadratic non-monotone relations predicted metric. may beneficial remove sparsely filled categories, new trim argument. use new technique specify mice(..., method = \"pmm\", ...). numerical categorical variables imputed PMM. Potential advantages : Simpler faster fitting generalised linear model, e.g., logistic regression proportional odds model; insensitive order categories; need solve problems perfect prediction; inherit good statistical properties predictive mean matching. Note still lack solid evidence claims. (#576). Contributed @stefvanbuuren","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-3","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.3","text":"New system-independent method pooling: version introduces new function pool.table() takes tidy table parameter estimates stemming m repeated analyses. input data must consist three columns (parameter name, estimate, standard error) specification degrees freedom model fitted complete data. pool.table() function outputs 14 pooled statistics tidy form. primary use pool.table() support parameter pooling techiques tidy() glance() methods, either within R outside R. pool.table() function also allows novel workflows 1) break apart traditional pool() function data-wrangling part parameters-reducing part, 2) necessarily depend classed R objects. (#574). Contributed @stefvanbuuren","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.3","text":"Fixes “large logo” problem. (#574). Contributed @hanneoberman","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-2","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.2","text":"Breaking change: complete(..., action = \"long\", ...) command puts columns named \".imp\" \".id\" last two positions long data (instead first two positions). way, columns imputed data positions original data, user-friendly easier work . Note existing code assumes variables \".imp\" \".id\" columns 1 2 need modified. advice modify code using variable names \".imp\" \".id\". want old behaviour, specify argument order = \"first\". (#569). Contributed @stefvanbuuren","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-1","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.1","text":"Adds support dots argument ranger::ranger(...) mice.impute.rf() (#563). Contributed @edbonneville","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3160","dir":"Changelog","previous_headings":"","what":"mice 3.16.0","title":"mice 3.16.0","text":"CRAN release: 2023-06-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.0","text":"Expands futuremice() functionality allowing external packages user-written functions (#550). Contributed @thomvolker Adds GH issue templates bug_report, feature_request help_wanted (#560). Contributed @hanneoberman","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.0","text":"Removes documentation files rbind.mids() cbind.mids() conform CRAN policy Adds mitml glmnet imports test code conforms _R_CHECK_DEPENDS_ONLY=true flag R CMD check Initializes random number generator futuremice() .Random.seed yet. Updates GitHub actions package checking site building Preserves user settings predictorMatrix case F adding predictorMatrix argument make.predictorMatrix() Polishes mice.impute.mpmm() example code","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.0","text":"Adds proper support factors mice.impute.2lonly.pmm() (#555) Solves function naming problems S3 generic functions tidy(), update(), format() sum() -comments weeds example&test code silence R CMD check _R_CHECK_DEPENDS_ONLY=true Fixes small bug futuremice() throws error number cores specified, number available cores greater number imputations. Solves bug mice.impute.mpmm() changed column order data","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3150","dir":"Changelog","previous_headings":"","what":"mice 3.15.0","title":"mice 3.15.0","text":"CRAN release: 2022-11-19","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-15-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.15.0","text":"Adds function futuremice() support parallel imputation using future package (#504). Contributed @thomvolker, @gerkovink Adds multivariate predictive mean matching mice.impute.mpmm(). (#460). Contributed @Mingyang-Cai Adds convergence() convergence evaluation (#484). Contributed @hanneoberman Reverts internal seed behaviour back mice 3.13.10 (#515). #432 introduced new local seed response #426. However, various issues arose facility (#459, #492, #502, #505). version restores old behaviour using global .Random.seed. Contributed @gerkovink Adds custom.t argument pool() allows advanced user specify custom rule calculating total variance TT. Contributed @gerkovink Adds new argument exclude mice.impute.pmm() excludes user-specified vector values matching. Excluded values appear imputations. Since observed values imputed, user-specified values still used fit imputation model (#392, #519). Contributed @gerkovink","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-15-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.15.0","text":"Styles .R .Rmd files Makes post-processing assignment consistent lines 85/86 sampler.R (#511) Edit test broken R<4 (#501). Contributed @MichaelChirico Adds support models reporting contrasts rather terms (#498). Contributed @LukasWallrich Applies edits autocorrelation function (#491). Contributed @hanneoberman Changes p-value calculation robust alternative (#494). Contributed @AndrewLawrence Uses inherits() check class membership Adds decprecation notices parlmice() Adapt prop, patterns weights matrices pattern 1’s Adds warning patterns generated (#449, #317, #451) Adds warning order model terms D1() D2() (#420) Adds example code fit model train data apply test data mice() Adds example code synthetic data generation analysis make.() Adds testfile test-mice.impute.rf.R(#448)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-15-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.15.0","text":"Replaces .Random.seed reads .GlobalEnv get(\".Random.seed\", envir = globalenv(), mode = \"integer\", inherits = FALSE) Repairs capitalisation problems lastSeedValue variable name Solves x$lastSeedValue problem cbind.mids() (#502) Fixes problems ampute() Preserves stochastic nature mice() smarter random seed initialisation (#459) Repairs drop = FALSE buglet mice.impute.rf() (#447, #448) @str-amg reported new dependency withr package version 2.4.0 (published January 2021) higher. Versions withr 2.3.0 may give Error: object 'local_seed' exported 'namespace:withr'. Either update manually, install patched version mice 3.14.1 GitHub. (#445). NOTE: withr longer needed mice 3.15.0","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3140","dir":"Changelog","previous_headings":"","what":"mice 3.14.0","title":"mice 3.14.0","text":"CRAN release: 2021-11-24","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-14-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.14.0","text":"Adds four new univariate functions using lasso automatic variable selection. Contributed @EdoardoCostantini (#438). mice.impute.lasso.norm() lasso linear regression mice.impute.lasso.logreg() lasso logistic regression mice.impute.lasso.select.norm() lasso selector + linear regression mice.impute.lasso.select.logreg() lasso selector + logistic regression Adds Jamshidian && Jalal’s non-parametric MCAR test, mice::MCAR() associated plot method. Contributed @cjvanlissa (#423). Adds two new functions pool.syn() pool.scalar.syn() specialise pooling estimates synthetic data. \"reiter2003\" pooling rule assumes synthetic data created complete data. Thanks Thom Volker (#436). default, mice.impute.rf() now uses faster ranger package back-end instead randomForest package. want old behaviour specify rfPackage = \"randomForest\" argument mice(...) call. Contributed @prockenschaub (#431).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-14-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.14.0","text":"Avoids changing global .Random.seed (#426, #432) implementing withr::local_preserve_seed() withr::local_seed(). change provides stabler behavior complex scripts. change appear break reproducibility mice() run seed. Nevertheless, run reproducibility problem, install mice 3.13.12 . Improves imputation parabolic data mice.impute.quadratic(), adds parameter quad.outcome containing name outcome variable complete-data model. Contributed @Mingyang-Cai, @gerkovink (#408) Generalises pool() processes parameters gamlss sub-models. Thanks Marcio Augusto Diniz (#406, #405) Uses robust standard error estimate pooling pool() can extract robust.se object returned broom::tidy() (#310) Replaces URL jstatsoft DOI Update reference literature (#442) Informs user pool() take mids object (#433) Updates documentation post-processing functionality (#387) Adds Rcpp necessities Solves problem “last resort” initialisation factors (#410) Documents “flat-line behaviour” mice.impute.2l.lmer() indicate problem fitting imputation model (#385) Add reprex test (#326) Documents multivariate imputation methods support post parameter (#326)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-14-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.14.0","text":"Contains emergency solution install..demand() broke standard CRAN workflow. mice 3.14.0 call install..demand() anymore recommended packages. Also, install..demand() run anymore non-interactive mode. Repairs error mice:::barnard.rubin() function infinite dfcom. Thanks @huftis (#441). Solves problem Xi <- .matrix(...) mice.impute.2l.lmer() occurred cluster contains one observation (#384) Edits predictorMatrix monotone pattern visitSequence = \"monotone\" maxit = 1 (#316) Solves problem plot produced md.pattern() (#318, #323) Fixes intercept make.formulas() (#305, #324) Fixes seed using newdata mice.mids() (#313, #325) Solves problem row names element created rbind() (#319) Solves bug mnar imputation routine. Contributed Margarita Moreno Betancur.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3130","dir":"Changelog","previous_headings":"","what":"mice 3.13.0","title":"mice 3.13.0","text":"CRAN release: 2021-01-27","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-13-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.13.0","text":"Updated mids2spss() replaces foreign haven package. Contributed Gerko Vink (#291)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-13-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.13.0","text":"Repairs error tests\\testhat\\test-D1.R failed mitml 0.4-0 Reverts .mids() function old version change commit 4634094 broke downstream package metafor (#292) Solves glitch mice.impute.rf() finding candidate donors (#288, #289)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3120","dir":"Changelog","previous_headings":"","what":"mice 3.12.0","title":"mice 3.12.0","text":"CRAN release: 2020-11-14","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-12-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.12.0","text":"Much faster predictive mean matching. new matchindex C function makes predictive mean matching 50 600 times faster. speed pmm now par normal imputation (mice.impute.norm()) miceFast package, without compromising statistical quality imputations. Thanks Polkas https://github.com/Polkas/miceFast/issues/10 suggestions Alexander Robitzsch. See #236 details. New ignore argument mice(). argument logical vector nrow(data) elements indicating rows ignored creating imputation model. may use ignore argument split data training set (imputation model built) test set (influence imputation model estimates). argument based suggestion https://github.com/amices/mice/issues/32#issuecomment-355600365. See #32 background techniques. Crafted Patrick Rockenschaub New filter() function mids objects. New filter() method subsets mids object (multiply-imputed data set). method accepts logical vector length nrow(data), expression construct vector incomplete data. (#269). Crafted Patrick Rockenschaub. Breaking change: matcher algorithm pmm changed matchindex speed improvements. want old behavior, specify mice(..., use.matcher = TRUE).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-12-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.12.0","text":"Corrected installation problem related cpp11 package (#286) Simplifies .mids() calling eval_tidy() quosure. yet solve #265. Improve documentation pool() pool.scalar() (#142, #106, #190 others) Makes tidy.mipo flexible (#276) Solves problem nelsonaalen() gets tibble (#272) Add explanation NAs can appear imputed data (#267) Add warning quickpred() documentation (#268) Styles sources files styler Improves consistency code documentation Moves internally defined functions global namespace Solves bug internal sum.scores() Adds deprecated messages lm.mids(), glm.mids(), pool.compare() Removes .pmm.match() expandcov() Strips return() calls placed just end--function Remove trailing spaces Repairs bug routine finding printFlag value (#258) Update URL’s transfer organisation amices","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3110","dir":"Changelog","previous_headings":"","what":"mice 3.11.0","title":"mice 3.11.0","text":"CRAN release: 2020-08-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-11-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.11.0","text":"Cox model return df.residual, caused problematic behavior D1(), D2(), D3(), anova() pool(). mice now extracts relevant information parts objects returned survival::coxph(), solves long-standing issues integration Cox model (#246).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-11-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.11.0","text":"Adds missing Rccp dependency work tidyr 1.1.1 (#248). Addresses warnings: Non-file package-anchored link(s) documentation object. Updates ampute documentation (#251). Ask user permission installing package suggests.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3100","dir":"Changelog","previous_headings":"","what":"mice 3.10.0","title":"mice 3.10.0","text":"CRAN release: 2020-07-13","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-10-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.10.0","text":"New functions tidy.mipo() glance.mipo() return standardized output conforms broom specifications. Kindly contributed Vincent Arel Bundock (#240).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-10-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.10.0","text":"Solves problem D3 testing script produced error CRAN (#244).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-390","dir":"Changelog","previous_headings":"","what":"mice 3.9.0","title":"mice 3.9.0","text":"CRAN release: 2020-05-14","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-9-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.9.0","text":"D3() function mice gave incorrect results. version solves problem calculation D3-statistic. See #226 #228 details. documentation explains results mice::D3() mitml::testModels() may differ. pool() function now forgiving glance() function (#233) possible bypass remove.lindep() setting eps = 0 (#225)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-9-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.9.0","text":"Adds reference Leacy’s thesis Adds example plot.mids() documentation","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-380","dir":"Changelog","previous_headings":"","what":"mice 3.8.0","title":"mice 3.8.0","text":"CRAN release: 2020-02-21","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-8-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.8.0","text":"version adds two new NARFCS methods imputing data Missing Random (MNAR) assumption. NARFCS generalised version -called δ\\delta-adjustment method. Margarita Moreno-Betancur Ian White kindly contributes functions mice.impute.mnar.norm() mice.impute.mnar.logreg(). functions aid performing sensitivity analysis investigate impact different MNAR assumptions conclusion study. alternative MNAR older mice.impute.ri() function. Installation mice faster. External packages needed imputation analyses now installed demand. number dependencies estimated rsconnect::appDepencies() decreased 132 83. name clash complete() function tidyr longer problem. now flexible pool() function integrates better broom broom.mixed packages.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-8-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.8.0","text":"Deprecates pool.compare(). Use D1() instead (#220) Removes everything utils::globalVariables() Prevents name clashes tidyr defining complete.mids() S3 method tidyr::complete() generic (#212) Extends pool() function deal multiple sets parameters. Currently supported keywords : term (broom functions), component (broom.mixed functions) y.values (multinom() model) (#219) Adds new install..demand() function lighter installation Adds toenail2 remove dependency HSAUR3 Solves problem ampute extreme cases (#216) Solves problem pool mgcv::gam (#218) Adds .gitattributes consistent line endings","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-370","dir":"Changelog","previous_headings":"","what":"mice 3.7.0","title":"mice 3.7.0","text":"CRAN release: 2019-12-13 Solves bug made polr() always fail (#206) Aborts one columns data.frame (#208) Update mira-class documentation (#207) Remove links deprecated package CALIBERrfimpute Adds check partial missing level-2 data 2lonly.norm 2lonly.pmm Change calculation a2 elementwise division matrix observations Extend documentation 2lonly.norm 2lonly.pmm Repair return value 2lonly.pmm Imputation method 2lonly.mean now also works factors Replace deprecated imputationMethod argument examples method informative error message stopped pre-processing (#194) Updated URL’s DESCRIPTION Fix string matching check.predictorMatrix() (#191)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-360","dir":"Changelog","previous_headings":"","what":"mice 3.6.0","title":"mice 3.6.0","text":"CRAN release: 2019-07-10 Copy toenail data orphaned DPpackage package Remove DPpackage Suggests field DESCRIPTION Adds support rotated names md.pattern() (#170, #177)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-350","dir":"Changelog","previous_headings":"","what":"mice 3.5.0","title":"mice 3.5.0","text":"CRAN release: 2019-05-13 version error fixes Fixes bug sampler ignored imputed values variables outside active block (#175, @alexanderrobitzsch) Adds note documenation .mids() (#173) Removes superfluous warning process_mipo() (#92) Fixes error degrees freedom P-value calculation (#171)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-340","dir":"Changelog","previous_headings":"","what":"mice 3.4.0","title":"mice 3.4.0","text":"CRAN release: 2019-03-07 Add hex sticker mice package. Designed Jaden M. Walters. Specify R3.5.0 random generator order pass CRAN tests Remove test-fix.coef.R tests Adds rotate.names argument md.pattern() (#154, #160) Fix solve name-matching problem (#156, #149, #147) Fix removes pre-check existence mice.impute.xxx() mice::mice() works expected (#55) Solves bug crashed mids2spss(), thanks Edgar Schoreit (#149) Solves problem routing logic (#149) causing passive imputation done predictors specified. passive imputation correctly ignore specification predictorMatrix. Implements alternative solution #93 #96. Instead skipping imputation variables without predictors, mice 3.3.1 impute variables using intercept Adds routine contributed Simon Grund checks deprecated arguments #137 Improves nelsonaalen() function data variables time status already defined (#140), thanks matthieu-faron","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-330","dir":"Changelog","previous_headings":"","what":"mice 3.3.0","title":"mice 3.3.0","text":"CRAN release: 2018-07-27 Solves bug passive imputation (#130). Warning: bug may caused invalid imputations mice 3.0.0 - mice 3.2.0 passive imputation. Updates code broom 0.5.0 (#128) Solves problem mice.impute.2l.norm() (#129) Use explicit foreign function calls tests","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-320","dir":"Changelog","previous_headings":"","what":"mice 3.2.0","title":"mice 3.2.0","text":"CRAN release: 2018-07-24 Skip tests mice.impute.2l.norm() (#129) Skip tests D1() (#128) Solve problem md.pattern (#126) Evades warning rbind cbind (#114) Solves rbind problem method list (#113) efficient use parlmice (#109) Add dfcom argument pool() (#105, #110) Updates parlmice + bugfix (#107)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-310","dir":"Changelog","previous_headings":"","what":"mice 3.1.0","title":"mice 3.1.0","text":"CRAN release: 2018-06-20 New parallel functionality: parlmice (#104) Incorporate suggestion @JoergMBeyer flux (#102) Replace duplicate code estimice (#101) Better checking empty methods (#99) Remove problem parent.frame (#98) Set empty method complete data (#93) Add NEWS.md, index.Rmd online package documentation Track .R instead .r Patch issue updateLog (#8, @alexanderrobitzsch) Extend README Repair issue md.pattern (#90) Repair check m (#89)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-300","dir":"Changelog","previous_headings":"","what":"mice 3.0.0","title":"mice 3.0.0","text":"CRAN release: 2018-05-25 Version 3.0 represents major update implements following features: blocks: main algorithm iterates blocks. block simply collection variables. common MICE algorithm block equivalent one variable, - course - default; blocks argument allows mixing univariate imputation method multivariate imputation methods. blocks feature bridges two seemingly disparate approaches, joint modeling fully conditional specification, one framework; : argument logical matrix size data specifies cells imputed. opens new analytic possibilities; Multivariate tests: new functions D1(), D2(), D3() anova() perform multivariate parameter tests repeated analysis multiply-imputed data; formulas: old form argument redesign now renamed formulas. provides alternative way specify imputation models exploits full power R’s native formula’s. Better integration tidyverse framework, especially packages dplyr, tibble broom; Improved numerical algorithms low-level imputation function. Better handling duplicate variables. Last least: brand new edition online version Flexible Imputation Missing Data. Second Edition.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-2469","dir":"Changelog","previous_headings":"","what":"mice 2.46.9","title":"mice 2.46.9","text":"simplify code mids object mice (thanks stephematician) (#61) simplify code rbind.mids (thanks stephematician) (#59) repair bug pool.compare() handling factors (#60) fixed bug rbind.mids handling (#59) add new arguments .mids(), add () update contact info resolved problem cart accepting matrix (thanks Joerg Drechsler) Adds generalized pool() list models Switch 3-digit versioning Date: 2017-12-08","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-246","dir":"Changelog","previous_headings":"","what":"mice 2.46","title":"mice 2.46","text":"Allow capitals imputation methods Date: 2017-10-22","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-245","dir":"Changelog","previous_headings":"","what":"mice 2.45","title":"mice 2.45","text":"Reorganized vignettes land GitHUB pages Date: 2017-10-21","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-244","dir":"Changelog","previous_headings":"","what":"mice 2.44","title":"mice 2.44","text":"Code changes robustness, style efficiency (Bernie Gray) Date: 2017-10-18","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-243","dir":"Changelog","previous_headings":"","what":"mice 2.43","title":"mice 2.43","text":"Updates ampute function vignettes (Rianne Schouten) Date: 2017-07-20","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-242","dir":"Changelog","previous_headings":"","what":"mice 2.42","title":"mice 2.42","text":"Rename mice.impute.2l.sys mice.impute.2l.lmer Date: 2017-07-11","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-241","dir":"Changelog","previous_headings":"","what":"mice 2.41","title":"mice 2.41","text":"Add new feature: whereargument mice Add new wy argument imputation functions Add mice.impute.2l.sys(), author Shahab Jolani Update many simplifications code enhancements Fixed broken cbind() function Fixed Bug made pad element disappear mids object Date: 2017-07-10","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-240","dir":"Changelog","previous_headings":"","what":"mice 2.40","title":"mice 2.40","text":"Fixed integration lattice package Updates colors xyplot.mads Add support factors mice.impute.2lonly.pmm() Create robust version .mids() Update ampute() Rianne Schouten Fix timestamp problem rebuilding vignette using R 3.4.0. Date: 2017-07-07","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-234","dir":"Changelog","previous_headings":"","what":"mice 2.34","title":"mice 2.34","text":"Update roxygen 6.0.1 Stylistic changes mice function (thanks Ben Ogorek) Calls cbind.mids() replaced calls cbind() Date: 2017-04-24","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-231","dir":"Changelog","previous_headings":"","what":"mice 2.31","title":"mice 2.31","text":"Add link miceVignettes github (thanks Gerko Vink) Add package documentation Add README GitHub Add new ampute functions vignette (thanks Rianne Schouten) Rename ccn –> ncc, icn –> nic Change helpers cc(), ncc(), cci(), ic(), nic() ici() use S3 dispatch Change issues tracker Github - add BugReports URL #21 Fixed multinom MaxNWts type fix polyreg polr #9 Fix checking nested models pool.compare #12 Fix .mids names columns #11 Fix extension glmer models #5 Date: 2017-02-23","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-229","dir":"Changelog","previous_headings":"","what":"mice 2.29","title":"mice 2.29","text":"Add midastouch: predictive mean matching small samples (thanks Philip Gaffert, Florian Meinfelder) Date: 2016-10-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-228","dir":"Changelog","previous_headings":"","what":"mice 2.28","title":"mice 2.28","text":"Repaired dots problem rpart call Date: 2016-10-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-227","dir":"Changelog","previous_headings":"","what":"mice 2.27","title":"mice 2.27","text":"Add ridge 2l.norm() Remove .o files Date: 2016-07-27","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-225","dir":"Changelog","previous_headings":"","what":"mice 2.25","title":"mice 2.25","text":"CRAN release: 2015-11-09 Fix .mids() bug crashed miceadds::mice.1chain() Date: 2015-11-09","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-223","dir":"Changelog","previous_headings":"","what":"mice 2.23","title":"mice 2.23","text":"Update example code /doc Remove lots dependencies, general cleanup Fix impute.polyreg() bug bombed predictors (thanks Jan Graffelman) Fix .mids() bug gave incorrect mm (several users) Fix pool.compare() error lmer object (thanks Claudio Bustos) Fix error mice.impute.2l.norm() just one NA (thanks Jeroen Hoogland) Date: 2015-11-04","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-222","dir":"Changelog","previous_headings":"","what":"mice 2.22","title":"mice 2.22","text":"CRAN release: 2014-06-11 Add six times faster predictive mean matching pool.scalar() now can Barnard-Rubin adjustment pool() now handles class lmerMod lme4 package Added automatic bounds donors .pmm.match() safety Added donors argument mice.impute.pmm() increased visibility Changes default number trees mice.impute.rf() 100 10 (thanks Anoop Shah) long2mids() deprecated. Use .mids() instead Put lattice back DEPENDS find generic xyplot() friends Fix error 2lonly.pmm (thanks Alexander Robitzsch, Gerko Vink, Judith Godin) Fix number imputations .mids() (thanks Tommy Nyberg, Gerko Vink) Fix colors mdc() example mice.impute.quadratic() Fix error mice.impute.rf() just one NA (thanks Anoop Shah) Fix error summary.mipo() names(x$qbar) equals NULL (thanks Aiko Kuhn) Fix improper testing ncol() mice.impute.2lonly.mean() Date: 2014-06-11","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-221","dir":"Changelog","previous_headings":"","what":"mice 2.21","title":"mice 2.21","text":"CRAN release: 2014-02-05 FIXED: compilation problem match.cpp solaris CC Date: 02-05-2014 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-220","dir":"Changelog","previous_headings":"","what":"mice 2.20","title":"mice 2.20","text":"CRAN release: 2014-02-04 ADDED: experimental fastpmm() function using Rcpp FIXED: fixes mice.impute.cart() mice.impute.rf() (thanks Anoop Shah) Date: 02-02-2014 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-219","dir":"Changelog","previous_headings":"","what":"mice 2.19","title":"mice 2.19","text":"ADDED: mice.impute.rf() random forest imputation (thanks Lisa Doove) CHANGED: default number donors mice.impute.pmm() changed 3 5. Use mice(…, donors = 3) get old behavior. CHANGED: speedup .norm.draw() using crossprod() (thanks Alexander Robitzsch) CHANGED: speedup .imputation.level2() (thanks Alexander Robitzsch) FIXED: define MASS, nnet, lattice imports instead depends FIXED: proper handling rare case remove.lindep() removed predictors (thanks Jaap Brand) Date: 21-01-2014 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-218","dir":"Changelog","previous_headings":"","what":"mice 2.18","title":"mice 2.18","text":"CRAN release: 2013-08-01 ADDED: .mids() converting long format mids object (thanks Gerko Vink) FIXED: mice.impute.logreg.boot() now properly exported (thanks Suresh Pujar) FIXED: two bugs rbind.mids() (thanks Gerko Vink) Date: 31-07-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-217","dir":"Changelog","previous_headings":"","what":"mice 2.17","title":"mice 2.17","text":"CRAN release: 2013-05-12 ADDED: new form argument mice() specify imputation models using forms (contributed Ross Boylan) FIXED: .mids(), .mids(), .mira() .mipo() exported FIXED: eliminated errors documentation pool.scalar() FIXED: error mice.impute.ri() (thanks Shahab Jolani) Date: 10-05-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-216","dir":"Changelog","previous_headings":"","what":"mice 2.16","title":"mice 2.16","text":"CRAN release: 2013-04-27 ADDED: random indicator imputation mice.impute.ri() nonignorable models (thanks Shahab Jolani) ADDED: workhorse functions .norm.draw() .pmm.match() exported FIXED: bug 2.14 2.15 mice.impute.pmm() produced error factors FIXED: bug crashed R class variable incomplete (thanks Robert Long) FIXED: bug 2l.pan 2l.norm convert class factor integer (thanks Robert Long) FIXED: warning eliminated caused character variables (thanks Robert Long) Date: 27-04-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-215","dir":"Changelog","previous_headings":"","what":"mice 2.15","title":"mice 2.15","text":"CRAN release: 2013-04-03 CHANGED: complete reorganization documentation source files ADDED: source published GitHub.com ADDED: new imputation method mice.impute.cart() (thanks Lisa Doove) FIXED: calculation degrees freedom pool.compare() (thanks Lorenz Uhlmann) FIXED: error DESCRIPTION file (thanks Kurt Hornik) Date: 02-04-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-214","dir":"Changelog","previous_headings":"","what":"mice 2.14","title":"mice 2.14","text":"CRAN release: 2013-03-19 ADDED: mice.impute.2l.mean() imputing class means level 2 ADDED: sampler(): new checks degrees freedom per variable iteration 1 ADDED: function check.df() throw warning low degrees freedom FIXED: tolower() added “2l” test sampler() FIXED: conversion factors roles (multilevel) padModel() FIXED: family argument call glm() glm.mids() (thanks Nicholas Horton) FIXED: .norm.draw(): evading NaN imputed values setting df rchisq() minimum 1 FIXED: bug mice.df() prevented classic Rubin df calculation (thanks Jean-Batiste Pingaul) FIXED: bug fixed mice.impute.2l.norm() (thanks Robert Long) CHANGED: faster .pmm.match2() version 2.12 renamed default .pmm.match() Date: 11-03-2013 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-213","dir":"Changelog","previous_headings":"","what":"mice 2.13","title":"mice 2.13","text":"CRAN release: 2012-07-04 ADDED: new multilevel functions 2l.pan(), 2lonly.norm(), 2lonly.pmm() (contributed Alexander Robitzsch) ADDED: new quadratic imputation function: quadratic() (contributed Gerko Vink) ADDED: pmm2(), five times faster pmm() ADDED: new argument data.init mice() initialization (suggested Alexander Robitzsch) ADDED: mice() now accepts pmm method (ordered) factors ADDED: warning note 2l.norm() advises use type=2 predictors FIXED: bug chrashed plot.mids() one incomplete variable (thanks Dennis Prangle) FIXED: bug sample() .pmm.match() donor=1 (thanks Alexander Robitzsch) FIXED: bug sample() mice.impute.sample() FIXED: fixed ‘?data’ bug check.method() REMOVED: wp.twin(). Now available AGD package Date: 03-07-2012 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-212","dir":"Changelog","previous_headings":"","what":"mice 2.12","title":"mice 2.12","text":"CRAN release: 2012-03-25 UPDATE: version launch Flexible Imputation Missing Data (FIMD) ADDED: code fimd1.r-fim9.r inst/doc calculating solutions FIMD FIXED: robust version supports.transparent() (thanks Brian Ripley) ADDED: auxiliary functions ifdo(), long2mids(), appendbreak(), extractBS(), wp.twin() ADDED: getfit() function ADDED: datasets: tbc, potthoffroy, selfreport, walking, fdd, fdgs, pattern1-pattern4, mammalsleep FIXED: .mira() added namespace ADDED: functions flux(), fluxplot() fico() missing data patterns ADDED: function nelsonaalen() imputing survival data CHANGED: rm.whitespace() shortened FIXED: bug pool() crashed nonstandard behavior survreg() (thanks Erich Studerus) CHANGED: pool() streamlined, warnings incompatibility lengths coef() vcov() FIXED: mdc() bug ignored transparent=FALSE argument, now made visible FIXED: bug md.pattern() >32 variables (thanks Sascha Vieweg, Joshua Wiley) Date: 25-03-2012 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-211","dir":"Changelog","previous_headings":"","what":"mice 2.11","title":"mice 2.11","text":"CRAN release: 2011-11-22 UPDATE: definite reference JSS paper ADDED: rm.whitespace() string manipulation (thanks Gerko Vink) ADDED: function mids2mplus() export data Mplus (thanks Gerko Vink) CHANGED: plot.mids() changed trellis version ADDED: code used JSS-paper FIXED: bug check.method() (thanks Gerko Vink) Date: 21-11-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-210","dir":"Changelog","previous_headings":"","what":"mice 2.10","title":"mice 2.10","text":"CRAN release: 2011-09-15 FIXED: arguments dec sep mids2spss (thanks Nicole Haag) FIXED: bug keyword “monotone” mice() (thanks Alain D) Date: 14-09-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-29","dir":"Changelog","previous_headings":"","what":"mice 2.9","title":"mice 2.9","text":"CRAN release: 2011-09-01 FIXED: appropriate trimming ynames xnames Trellis plots FIXED: exported: spss2mids(), mice.impute.2L.norm() ADDED: mice.impute.norm.predict(), mice.impute.norm.boot(), mice.impute.logreg.boot() ADDED: supports.transparent() detect whether .Device can semi-transparent colors FIXED: stringr package now properly loaded ADDED: trellis version plot.mids() ADDED: automatic semi-transparancy detection mdc() FIXED: documentation mira class (thanks Sandro Tsang) Date: 31-08-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-28","dir":"Changelog","previous_headings":"","what":"mice 2.8","title":"mice 2.8","text":"CRAN release: 2011-03-26 FIXED: bug fixed find.collinear() bombed one variable left Date: 24-03-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-27","dir":"Changelog","previous_headings":"","what":"mice 2.7","title":"mice 2.7","text":"CRAN release: 2011-03-16 CHANGED: check.data(), remove.lindep(): fully missing variables imputed allow.na=TRUE (Alexander Robitzsch) FIXED: bug check.data(). Now checks collinearity predictors (Alexander Robitzsch) CHANGED: abbreviations arguments eliminated evade linux warnings Date: 16-03-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-26","dir":"Changelog","previous_headings":"","what":"mice 2.6","title":"mice 2.6","text":"CRAN release: 2011-03-04 ADDED: bwplot(), stripplot(), densityplot() xyplot() creating Trellis graphs ADDED: function mdc() mice.theme() graphical parameters ADDED: argument passing mice() lower-level functions (requested Juned Siddique) FIXED: erroneous rgamma() replaced rchisq() .norm.draw, lowers variance bit small n ADDED: .mids() extended handle expression objects FIXED: reporting bug summary.mipo() CHANGED: df calculation pool(), intervals may become slightly wider ADDED: internal functions mice.df() df.residual() FIXED: error rm calculation “likelihood” pool.compare() CHANGED: default ridge parameter changed Date: 03-03-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-25","dir":"Changelog","previous_headings":"","what":"mice 2.5","title":"mice 2.5","text":"CRAN release: 2011-01-06 ADDED: various stability enhancements code clean-ADDED: find.collinear() function CHANGED: automatic removal constant collinear variables ADDED: ridge parameter .norm.draw() .norm.fix() ADDED: mice.impute.polr() ordered factors FIXED: chainMean chainVar mice.mids() FIXED: iteration counter mice.mids sampler() ADDED: component ‘loggedEvents’ mids-object logging actions REMOVED: annoying warnings removed predictors ADDED: updateLog() function CHANGED: smarter handling model setup mice() CHANGED: .pmm.match() now draws three closest donors ADDED: mids2spss() shipping mids-object SPSS FIXED: change summary.mipo() work .mira() ADDED: function mice.impute.2L.norm.noint() ADDED: function .mira() FIXED: global assign() removed mice.impute.polyreg() FIXED: improved handling factors complete() FIXED: improved labeling nhanes2 data Date: 06-01-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-24","dir":"Changelog","previous_headings":"","what":"mice 2.4","title":"mice 2.4","text":"CRAN release: 2010-10-18 ADDED: pool() now supports class ‘polr’ (Jean-Baptiste Pingault) FIXED: solved problem mice.impute.polyreg one variables named y x FIXED: remove.lindep: intercept prediction bug ADDED: version() function ADDED: cc(), cci() ccn() convenience functions Date: 17-10-2010 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-23","dir":"Changelog","previous_headings":"","what":"mice 2.3","title":"mice 2.3","text":"CRAN release: 2010-02-14 FIXED: check.method: logicals now treated binary variables (Emmanuel Charpentier) FIXED: complete: NULL imputation case now properly handled FIXED: mice.impute.pmm: now creates imputation variability univariate predictor FIXED: remove.lindep: returns ‘keep’ vector instead data Date: 14-02-2010 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-22","dir":"Changelog","previous_headings":"","what":"mice 2.2","title":"mice 2.2","text":"CRAN release: 2010-01-14 ADDED: pool() now supports class ‘multinom’ (Jean-Baptiste Pingault) FIXED: bug fixed check.data data consisting two columns (Rogier Donders, Thomas Koepsell) ADDED: new function remove.lindep() removes predictors (almost) linearly dependent FIXED: bug fixed pool() produced (innocent) warning message (Qi Zheng) Date: 13-01-2010 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-21","dir":"Changelog","previous_headings":"","what":"mice 2.1","title":"mice 2.1","text":"CRAN release: 2009-09-18 ADDED: pool() now also supports class ‘mer’ CHANGED: nlme lme4 now loaded needed (pool()) FIXED: bug fixed mice.impute.polyreg() one missing entry (Emmanuel Charpentier) FIXED: bug fixed plot.mids() one missing entry (Emmanuel Charpentier) CHANGED: NAMESPACE expanded allow easy access function code FIXED: mice() can now find mice.impute.xxx() functions .GlobalEnv Date: 14-09-2009 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-20","dir":"Changelog","previous_headings":"","what":"mice 2.0","title":"mice 2.0","text":"CRAN release: 2009-08-27 Major upgrade JSS manuscript ADDED: new functions cbind.mids(), rbind.mids(), ibind() ADDED: new argument mice(): ‘post’ post-processing imputations ADDED: new functions: pool.scaler(), pool.compare(), pool.r.squared() ADDED: new data: boys, popmis, windspeed FIXED: function summary.mipo (object$df) command fixed REMOVED: data.frame..matrix replaced internal data.matrix function ADDED: new imputation method mice.impute.2l.norm() multilevel data CHANGED: pool now works class vcov() method ADDED: .mids() provides general complete-data analysis ADDED: type checking mice() ensure appropriate imputation methods ADDED: warning added mice() constant predictors ADDED: prevention perfect prediction mice.impute.logreg() mice.impute.polyreg() CHANGED: mice.impute.norm.improper() changed mice.impute.norm.nob() REMOVED: mice.impute.polyreg2() deleted ADDED: new ‘include’ argument complete() ADDED: support empty imputation method mice() ADDED: new function md.pairs() ADDED: support intercept imputation ADDED: new function quickpred() FIXED: plot.mids() bug fix number variables > 5 Date: 26-08-2009 / SvB, KO","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-121","dir":"Changelog","previous_headings":"","what":"mice 1.21","title":"mice 1.21","text":"CRAN release: 2009-03-17 FIXED: Stricter type checking logicals mice() evade warnings. CHANGED: Modernization help files. FIXED: padModel: treatment changed contr.treatment CHANGED: Functions check.visitSequence, check.predictorMatrix, check.imputationMethod now coded local mice() FIXED: existsFunction check.imputationMethod now works S-Plus R Date: 15/3/2009","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-116","dir":"Changelog","previous_headings":"","what":"mice 1.16","title":"mice 1.16","text":"CRAN release: 2009-02-19 FIXED: impution function impute.logreg used convergence criteria optimistic fitting GLM glm.fit. Thanks Ulrike Gromping. Date: 6/25/2007","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-115","dir":"Changelog","previous_headings":"","what":"mice 1.15","title":"mice 1.15","text":"CRAN release: 2007-01-09 FIXED: lm.mids glm.mids functions, parameters passed glm lm. Date: 01/09/2006","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-114","dir":"Changelog","previous_headings":"","what":"mice 1.14","title":"mice 1.14","text":"CRAN release: 2006-04-04 FIXED: Passive imputation works . (Roel de Jong) CHANGED: Random seed now left alone, UNLESS argument “seed” specified. means unless specify identical seed values, imputations dataset different multiple calls mice. (Roel de Jong) FIXED: (docs): Documentation “impute.mean” (Roel de Jong) FIXED: Function ‘summary.mids’ now works (Roel de Jong) FIXED: Imputation function ‘impute.polyreg’ ‘impute.lda’ now work R Date: 9/26/2005","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-113","dir":"Changelog","previous_headings":"","what":"mice 1.13","title":"mice 1.13","text":"Changed function checkImputationMethod Date: Feb 6, 2004","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-112","dir":"Changelog","previous_headings":"","what":"mice 1.12","title":"mice 1.12","text":"Maintainance, S-Plus 6.1 R 1.8 unicode Date: January 2004","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-11","dir":"Changelog","previous_headings":"","what":"mice 1.1","title":"mice 1.1","text":"R version (help Peter Malewski Frank Harrell) Date: Feb 2001","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-10","dir":"Changelog","previous_headings":"","what":"mice 1.0","title":"mice 1.0","text":"Original S-PLUS release Date: June 14 2000","code":""}]
+[{"path":[]},{"path":"https://amices.org/mice/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://amices.org/mice/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://amices.org/mice/CODE_OF_CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://amices.org/mice/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://amices.org/mice/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting project team stef.vanbuuren@tno.nl. complaints reviewed investigated result response deemed necessary appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately. Project maintainers follow enforce Code Conduct good faith may face temporary permanent repercussions determined members project’s leadership.","code":""},{"path":"https://amices.org/mice/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html answers common questions code conduct, see https://www.contributor-covenant.org/faq","code":""},{"path":"https://amices.org/mice/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 2, June 1991Copyright © 1989, 1991 Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://amices.org/mice/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"licenses software designed take away freedom share change . contrast, GNU General Public License intended guarantee freedom share change free software–make sure software free users. General Public License applies Free Software Foundation’s software program whose authors commit using . (Free Software Foundation software covered GNU Lesser General Public License instead.) can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge service wish), receive source code can get want , can change software use pieces new free programs; know can things. protect rights, need make restrictions forbid anyone deny rights ask surrender rights. restrictions translate certain responsibilities distribute copies software, modify . example, distribute copies program, whether gratis fee, must give recipients rights . must make sure , , receive can get source code. must show terms know rights. protect rights two steps: (1) copyright software, (2) offer license gives legal permission copy, distribute /modify software. Also, author’s protection , want make certain everyone understands warranty free software. software modified someone else passed , want recipients know original, problems introduced others reflect original authors’ reputations. Finally, free program threatened constantly software patents. wish avoid danger redistributors free program individually obtain patent licenses, effect making program proprietary. prevent , made clear patent must licensed everyone’s free use licensed . precise terms conditions copying, distribution modification follow.","code":""},{"path":"https://amices.org/mice/LICENSE.html","id":"terms-and-conditions-for-copying-distribution-and-modification","dir":"","previous_headings":"","what":"TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION","title":"GNU General Public License","text":"0. License applies program work contains notice placed copyright holder saying may distributed terms General Public License. “Program”, , refers program work, “work based Program” means either Program derivative work copyright law: say, work containing Program portion , either verbatim modifications /translated another language. (Hereinafter, translation included without limitation term “modification”.) licensee addressed “”. Activities copying, distribution modification covered License; outside scope. act running Program restricted, output Program covered contents constitute work based Program (independent made running Program). Whether true depends Program . 1. may copy distribute verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice disclaimer warranty; keep intact notices refer License absence warranty; give recipients Program copy License along Program. may charge fee physical act transferring copy, may option offer warranty protection exchange fee. 2. may modify copy copies Program portion , thus forming work based Program, copy distribute modifications work terms Section 1 , provided also meet conditions: ) must cause modified files carry prominent notices stating changed files date change. b) must cause work distribute publish, whole part contains derived Program part thereof, licensed whole charge third parties terms License. c) modified program normally reads commands interactively run, must cause , started running interactive use ordinary way, print display announcement including appropriate copyright notice notice warranty (else, saying provide warranty) users may redistribute program conditions, telling user view copy License. (Exception: Program interactive normally print announcement, work based Program required print announcement.) requirements apply modified work whole. identifiable sections work derived Program, can reasonably considered independent separate works , License, terms, apply sections distribute separate works. distribute sections part whole work based Program, distribution whole must terms License, whose permissions licensees extend entire whole, thus every part regardless wrote . Thus, intent section claim rights contest rights work written entirely ; rather, intent exercise right control distribution derivative collective works based Program. addition, mere aggregation another work based Program Program (work based Program) volume storage distribution medium bring work scope License. 3. may copy distribute Program (work based , Section 2) object code executable form terms Sections 1 2 provided also one following: ) Accompany complete corresponding machine-readable source code, must distributed terms Sections 1 2 medium customarily used software interchange; , b) Accompany written offer, valid least three years, give third party, charge cost physically performing source distribution, complete machine-readable copy corresponding source code, distributed terms Sections 1 2 medium customarily used software interchange; , c) Accompany information received offer distribute corresponding source code. (alternative allowed noncommercial distribution received program object code executable form offer, accord Subsection b .) source code work means preferred form work making modifications . executable work, complete source code means source code modules contains, plus associated interface definition files, plus scripts used control compilation installation executable. However, special exception, source code distributed need include anything normally distributed (either source binary form) major components (compiler, kernel, ) operating system executable runs, unless component accompanies executable. distribution executable object code made offering access copy designated place, offering equivalent access copy source code place counts distribution source code, even though third parties compelled copy source along object code. 4. may copy, modify, sublicense, distribute Program except expressly provided License. attempt otherwise copy, modify, sublicense distribute Program void, automatically terminate rights License. However, parties received copies, rights, License licenses terminated long parties remain full compliance. 5. required accept License, since signed . However, nothing else grants permission modify distribute Program derivative works. actions prohibited law accept License. Therefore, modifying distributing Program (work based Program), indicate acceptance License , terms conditions copying, distributing modifying Program works based . 6. time redistribute Program (work based Program), recipient automatically receives license original licensor copy, distribute modify Program subject terms conditions. may impose restrictions recipients’ exercise rights granted herein. responsible enforcing compliance third parties License. 7. , consequence court judgment allegation patent infringement reason (limited patent issues), conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. distribute satisfy simultaneously obligations License pertinent obligations, consequence may distribute Program . example, patent license permit royalty-free redistribution Program receive copies directly indirectly , way satisfy License refrain entirely distribution Program. portion section held invalid unenforceable particular circumstance, balance section intended apply section whole intended apply circumstances. purpose section induce infringe patents property right claims contest validity claims; section sole purpose protecting integrity free software distribution system, implemented public license practices. Many people made generous contributions wide range software distributed system reliance consistent application system; author/donor decide willing distribute software system licensee impose choice. section intended make thoroughly clear believed consequence rest License. 8. distribution /use Program restricted certain countries either patents copyrighted interfaces, original copyright holder places Program License may add explicit geographical distribution limitation excluding countries, distribution permitted among countries thus excluded. case, License incorporates limitation written body License. 9. Free Software Foundation may publish revised /new versions General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies version number License applies “later version”, option following terms conditions either version later version published Free Software Foundation. Program specify version number License, may choose version ever published Free Software Foundation. 10. wish incorporate parts Program free programs whose distribution conditions different, write author ask permission. software copyrighted Free Software Foundation, write Free Software Foundation; sometimes make exceptions . decision guided two goals preserving free status derivatives free software promoting sharing reuse software generally.","code":""},{"path":"https://amices.org/mice/LICENSE.html","id":"no-warranty","dir":"","previous_headings":"","what":"NO WARRANTY","title":"GNU General Public License","text":"11. PROGRAM LICENSED FREE CHARGE, WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION. 12. EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MAY MODIFY /REDISTRIBUTE PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES. END TERMS CONDITIONS","code":""},{"path":"https://amices.org/mice/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively convey exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program interactive, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, commands use may called something show w show c; even mouse-clicks menu items–whatever suits program. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. sample; alter names: General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License.","code":" Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice"},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"help-for-old-friends","dir":"Articles","previous_headings":"","what":"Help for old friends","title":"Help for old friends","text":"documents describes changes mice 2.46.0 mice 3.0.0. code written versions mice 2.12 - mice 2.46.0 run unchanged. tried minimize changes function arguments, possible remain 100% backward compatible. document outlines visible changes, suggests ways adapt old code mice 3.0.","code":""},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"mice-function-arguments","dir":"Articles","previous_headings":"Help for old friends","what":"mice function arguments","title":"Help for old friends","text":"changes made following arguments: data, m, , post, defaultMethod, maxit, printFlag, seed data.init. blocks specified, variable allocated separate block. case, length(blocks) identical ncol(data), method mice 3.0.0 reduces variable--variable imputation, mice 2.46.0 . Argument visitSequence may still specified integer numeric, internally converted character using column names data. existing function call mice using old form argument may result error Argument \"formulas\" list. advice specify formula list, e.g.,","code":"library(mice, warn.conflicts = FALSE) imp <- mice(nhanes, formulas = list( hyp ~ bmi, chl ~ age + hyp + bmi, bmi ~ age + hyp + chl ), print = FALSE, m = 1, maxit = 1, seed = 1 ) imp$formulas #> $hyp #> hyp ~ bmi #> #> $chl #> chl ~ age + hyp + bmi #> #> $bmi #> bmi ~ age + hyp + chl"},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"pool-function-uses-broom","dir":"Articles","previous_headings":"Help for old friends","what":"pool() function uses broom","title":"Help for old friends","text":"mice 2.46.0 used coef() vcov() extract parameters complete-data model. two problems approach: 1) coef() vcov() often defined analysis interest, 2) output standard across procedures. Older versions mice therefore needed quite custom code extract parameters variance estimates. mice 3.0.0 uses broom package task. advantage standardised output. downside (still) many packages offer defined tidy.xxx() glance.xxx() functions. cases, user sees error message Error: tidy methods objects class xxx. See pool() documentation cases.","code":""},{"path":"https://amices.org/mice/articles/oldfriends.html","id":"pool-for-mixed-models-requires-librarybroom-mixed","dir":"Articles","previous_headings":"Help for old friends","what":"pool() for mixed models requires library(broom.mixed)","title":"Help for old friends","text":"mice automatically loads broom package. Tidiers mixed models live broom.mixed packages automatically loaded. want pool results mixed model, issue library(broom.mixed) calling pool() function.","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"software","dir":"Articles","previous_headings":"","what":"Software","title":"Overview","text":"mice package CRAN mice GitHUB repository","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Overview","text":"mice package can installed CRAN follows: latest version can installed GitHub follows:","code":"install.packages(\"mice\") install.packages(\"devtools\") devtools::install_github(\"amices/mice\")"},{"path":"https://amices.org/mice/articles/overview.html","id":"capabilities-of-mice-package","dir":"Articles","previous_headings":"","what":"Capabilities of mice package","title":"Overview","text":"mice package contains functions Inspect missing data pattern Impute missing data mm times, resulting mm completed data sets Diagnose quality imputed values Analyze completed data set Pool results repeated analyses Store export imputed data various formats Generate simulated incomplete data Incorporate custom imputation methods Choose cells impute","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"main-functions","dir":"Articles","previous_headings":"","what":"Main functions","title":"Overview","text":"main functions mice package :","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"course-materials","dir":"Articles","previous_headings":"","what":"Course materials","title":"Overview","text":"Handling Missing Data R mice Statistical Methods combined data sets","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"vignettes","dir":"Articles","previous_headings":"","what":"Vignettes","title":"Overview","text":"Ad hoc methods MICE algorithm Convergence pooling Inspecting observed data missingness related Passive imputation post-processing Combining inferences Imputing multilevel data Sensitivity analysis mice Generate missing values ampute parlMICE: Parallel MICE imputation wrapper futuremice: Wrapper parallel MICE imputation futures","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"related-packages","dir":"Articles","previous_headings":"","what":"Related packages","title":"Overview","text":"Packages extend functionality mice include: ImputeRobust: Multiple Imputation GAMLSS countimp: Incomplete count data miceadds: Functions multilevel imputation micemd: Functions multilevel imputation smcfcs: Addressing incompatibility selected models fancyimpyute: MICE Python ordinal data","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"further-reading","dir":"Articles","previous_headings":"","what":"Further reading","title":"Overview","text":"mice: Multivariate Imputation Chained Equations R Journal Statistical Software (Buuren Groothuis-Oudshoorn 2011). first application missing blood pressure data (Buuren, Boshuizen, Knook 1999). Term Fully Conditional Specification describes general class methods specify imputations model multivariate data set conditional distributions (Buuren et al. 2006). Details imputing mixes numerical categorical data can found (Buuren 2007). Book Flexible Imputation Missing Data. Second Edition (Buuren 2018).","code":""},{"path":"https://amices.org/mice/articles/overview.html","id":"code-from-publications","dir":"Articles","previous_headings":"","what":"Code from publications","title":"Overview","text":"R code Flexible Imputation Missing Data. Second Edition R code mice: Multivariate Imputation Chained Equations R","code":""},{"path":[]},{"path":"https://amices.org/mice/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Stef van Buuren. Author, maintainer. Karin Groothuis-Oudshoorn. Author. Gerko Vink. Contributor. Rianne Schouten. Contributor. Alexander Robitzsch. Contributor. Patrick Rockenschaub. Contributor. Lisa Doove. Contributor. Shahab Jolani. Contributor. Margarita Moreno-Betancur. Contributor. Ian White. Contributor. Philipp Gaffert. Contributor. Florian Meinfelder. Contributor. Bernie Gray. Contributor. Vincent Arel-Bundock. Contributor. Mingyang Cai. Contributor. Thom Volker. Contributor. Edoardo Costantini. Contributor. Caspar van Lissa. Contributor. Hanne Oberman. Contributor. Stephen Wade. Contributor.","code":""},{"path":"https://amices.org/mice/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Stef van Buuren, Karin Groothuis-Oudshoorn (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. DOI 10.18637/jss.v045.i03.","code":"@Article{, title = {{mice}: Multivariate Imputation by Chained Equations in R}, author = {Stef {van Buuren} and Karin Groothuis-Oudshoorn}, journal = {Journal of Statistical Software}, year = {2011}, volume = {45}, number = {3}, pages = {1-67}, doi = {10.18637/jss.v045.i03}, }"},{"path":[]},{"path":"https://amices.org/mice/index.html","id":"multivariate-imputation-by-chained-equations","dir":"","previous_headings":"","what":"Multivariate Imputation by Chained Equations","title":"Multivariate Imputation by Chained Equations","text":"mice package implements method deal missing data. package creates multiple imputations (replacement values) multivariate missing data. method based Fully Conditional Specification, incomplete variable imputed separate model. MICE algorithm can impute mixes continuous, binary, unordered categorical ordered categorical data. addition, MICE can impute continuous two-level data, maintain consistency imputations means passive imputation. Many diagnostic plots implemented inspect quality imputations.","code":""},{"path":"https://amices.org/mice/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Multivariate Imputation by Chained Equations","text":"mice package can installed CRAN follows: latest version can installed GitHub follows:","code":"install.packages(\"mice\") install.packages(\"devtools\") devtools::install_github(repo = \"amices/mice\")"},{"path":"https://amices.org/mice/index.html","id":"minimal-example","dir":"","previous_headings":"","what":"Minimal example","title":"Multivariate Imputation by Chained Equations","text":"Missing data pattern nhanes data. Blue observed, red missing. table graph summarize missing data occur nhanes dataset. Distribution chl per imputed data set. general, like imputations plausible, .e., values observed missing. complete-data fit imputed dataset, results combined arrive estimates properly account missing data.","code":"library(mice, warn.conflicts = FALSE) # show the missing data pattern md.pattern(nhanes) #> age hyp bmi chl #> 13 1 1 1 1 0 #> 3 1 1 1 0 1 #> 1 1 1 0 1 1 #> 1 1 0 0 1 2 #> 7 1 0 0 0 3 #> 0 8 9 10 27 # multiple impute the missing values imp <- mice(nhanes, maxit = 2, m = 2, seed = 1) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl # inspect quality of imputations stripplot(imp, chl, pch = 19, xlab = \"Imputation number\") # fit complete-data model fit <- with(imp, lm(chl ~ age + bmi)) # pool and summarize the results summary(pool(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 9.08 73.09 0.124 4.50 0.9065 #> 2 age 35.23 17.46 2.017 1.36 0.2377 #> 3 bmi 4.69 1.94 2.417 15.25 0.0286"},{"path":"https://amices.org/mice/index.html","id":"mice-30","dir":"","previous_headings":"","what":"mice 3.0","title":"Multivariate Imputation by Chained Equations","text":"Version 3.0 represents major update implements following features: blocks: main algorithm iterates blocks. block simply collection variables. common MICE algorithm block equivalent one variable, - course - default; blocks argument allows mixing univariate imputation method multivariate imputation methods. blocks feature bridges two seemingly disparate approaches, joint modeling fully conditional specification, one framework; : argument logical matrix size data specifies cells imputed. opens new analytic possibilities; Multivariate tests: new functions D1(), D2(), D3() anova() perform multivariate parameter tests repeated analysis multiply-imputed data; formulas: old form argument redesign now renamed formulas. provides alternative way specify imputation models exploits full power R’s native formula’s. Better integration tidyverse framework, especially packages dplyr, tibble broom; Improved numerical algorithms low-level imputation function. Better handling duplicate variables. Last least: brand new edition online version Flexible Imputation Missing Data. Second Edition. See MICE: Multivariate Imputation Chained Equations resources. ’ll happy take feedback discuss suggestions. Please submit Github’s issues facility.","code":""},{"path":[]},{"path":"https://amices.org/mice/index.html","id":"books","dir":"","previous_headings":"Resources","what":"Books","title":"Multivariate Imputation by Chained Equations","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition.. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/index.html","id":"course-materials","dir":"","previous_headings":"Resources","what":"Course materials","title":"Multivariate Imputation by Chained Equations","text":"Handling Missing Data R mice Statistical Methods combined data sets","code":""},{"path":"https://amices.org/mice/index.html","id":"vignettes","dir":"","previous_headings":"Resources","what":"Vignettes","title":"Multivariate Imputation by Chained Equations","text":"Ad hoc methods MICE algorithm Convergence pooling Inspecting observed data missingness related Passive imputation post-processing Imputing multilevel data Sensitivity analysis mice Generate missing values ampute futuremice: Wrapper parallel MICE imputation futures","code":""},{"path":"https://amices.org/mice/index.html","id":"code-from-publications","dir":"","previous_headings":"Resources","what":"Code from publications","title":"Multivariate Imputation by Chained Equations","text":"Flexible Imputation Missing Data. Second edition.","code":""},{"path":"https://amices.org/mice/index.html","id":"acknowledgement","dir":"","previous_headings":"","what":"Acknowledgement","title":"Multivariate Imputation by Chained Equations","text":"cute mice sticker designed Jaden M. Walters. Thanks Jaden!","code":""},{"path":"https://amices.org/mice/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Multivariate Imputation by Chained Equations","text":"Please note mice project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models using D1-statistic — D1","title":"Compare two nested models using D1-statistic — D1","text":"D1-statistics multivariate Wald test.","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models using D1-statistic — D1","text":"","code":"D1(fit1, fit0 = NULL, dfcom = NULL, df.com = NULL)"},{"path":"https://amices.org/mice/reference/D1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models using D1-statistic — D1","text":"fit1 object class mira, produced (). fit0 object class mira, produced (). model fit0 nested within fit1. default null model fit0 = NULL compares fit1 intercept-model. dfcom single number denoting complete-data degrees freedom model fit1. specified, set equal df.residual model fit1. done, procedure assumes (perhaps incorrectly) large sample. df.com Deprecated","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compare two nested models using D1-statistic — D1","text":"Warning: `D1()` assumes order variables different models. See https://github.com/amices/mice/issues/420 details.","code":""},{"path":"https://amices.org/mice/reference/D1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models using D1-statistic — D1","text":"Li, K. H., T. E. Raghunathan, D. B. Rubin. 1991. Large-Sample Significance Levels Multiply Imputed Data Using Moment-Based Statistics F Reference Distribution. Journal American Statistical Association, 86(416): 1065–73. https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:wald","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/D1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare two nested models using D1-statistic — D1","text":"","code":"# Compare two linear models: imp <- mice(nhanes2, seed = 51009, print = FALSE) mi1 <- with(data = imp, expr = lm(bmi ~ age + hyp + chl)) mi0 <- with(data = imp, expr = lm(bmi ~ age + hyp)) D1(mi1, mi0) #> test statistic df1 df2 dfcom p.value riv #> 1 ~~ 2 5.28351 1 4 20 0.08306791 0.671799 if (FALSE) { # \\dontrun{ # Compare two logistic regression models imp <- mice(boys, maxit = 2, print = FALSE) fit1 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc + reg, family = binomial)) fit0 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc, family = binomial)) D1(fit1, fit0) } # }"},{"path":"https://amices.org/mice/reference/D2.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models using D2-statistic — D2","title":"Compare two nested models using D2-statistic — D2","text":"D2-statistic pools test statistics repeated analyses. method less powerful D1- D3-statistics.","code":""},{"path":"https://amices.org/mice/reference/D2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models using D2-statistic — D2","text":"","code":"D2(fit1, fit0 = NULL, use = \"wald\")"},{"path":"https://amices.org/mice/reference/D2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models using D2-statistic — D2","text":"fit1 object class mira, produced (). fit0 object class mira, produced (). model fit0 nested within fit1. default null model fit0 = NULL compares fit1 intercept-model. use character string denoting Wald- likelihood-based based tests. Can either \"wald\" \"likelihood\". used method = \"D2\".","code":""},{"path":"https://amices.org/mice/reference/D2.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compare two nested models using D2-statistic — D2","text":"Warning: `D2()` assumes order variables different models. See https://github.com/amices/mice/issues/420 details.","code":""},{"path":"https://amices.org/mice/reference/D2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models using D2-statistic — D2","text":"Li, K. H., X. L. Meng, T. E. Raghunathan, D. B. Rubin. 1991. Significance Levels Repeated p-Values Multiply-Imputed Data. Statistica Sinica 1 (1): 65–92. https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:chi","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/D2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare two nested models using D2-statistic — D2","text":"","code":"# Compare two linear models: imp <- mice(nhanes2, seed = 51009, print = FALSE) mi1 <- with(data = imp, expr = lm(bmi ~ age + hyp + chl)) mi0 <- with(data = imp, expr = lm(bmi ~ age + hyp)) D2(mi1, mi0) #> test statistic df1 df2 dfcom p.value riv #> 1 ~~ 2 3.649642 1 11.69791 NA 0.08089545 1.408231 if (FALSE) { # \\dontrun{ # Compare two logistic regression models imp <- mice(boys, maxit = 2, print = FALSE) fit1 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc + reg, family = binomial)) fit0 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc, family = binomial)) D2(fit1, fit0) } # }"},{"path":"https://amices.org/mice/reference/D3.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models using D3-statistic — D3","title":"Compare two nested models using D3-statistic — D3","text":"D3-statistic likelihood-ratio test statistic.","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models using D3-statistic — D3","text":"","code":"D3(fit1, fit0 = NULL, dfcom = NULL, df.com = NULL)"},{"path":"https://amices.org/mice/reference/D3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models using D3-statistic — D3","text":"fit1 object class mira, produced (). fit0 object class mira, produced (). model fit0 nested within fit1. default null model fit0 = NULL compares fit1 intercept-model. dfcom single number denoting complete-data degrees freedom model fit1. specified, set equal df.residual model fit1. done, procedure assumes (perhaps incorrectly) large sample. df.com Deprecated","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare two nested models using D3-statistic — D3","text":"object class mice.anova","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compare two nested models using D3-statistic — D3","text":"D3() function implement LR-method Meng Rubin (1992). implementation method relies broom package, standard update mechanism statistical models R offset function. function calculates m repetitions full (null) models, calculates mean estimates (fixed) parameter coefficients \\(\\beta\\). imputed imputed dataset, calculates likelihood model parameters constrained \\(\\beta\\). mitml::testModels() function offers similar functionality subset statistical models. Results mice::D3() mitml::testModels() differ multilevel models testModels() also constrains variance components parameters. details ","code":""},{"path":"https://amices.org/mice/reference/D3.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models using D3-statistic — D3","text":"Meng, X. L., D. B. Rubin. 1992. Performing Likelihood Ratio Tests Multiply-Imputed Data Sets. Biometrika, 79 (1): 103–11. https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:likelihoodratio http://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#setting-residual-variances---fixed-value-zero--","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/D3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compare two nested models using D3-statistic — D3","text":"","code":"# Compare two linear models: imp <- mice(nhanes2, seed = 51009, print = FALSE) mi1 <- with(data = imp, expr = lm(bmi ~ age + hyp + chl)) mi0 <- with(data = imp, expr = lm(bmi ~ age + hyp)) D3(mi1, mi0) #> test statistic df1 df2 dfcom p.value riv #> 1 ~~ 2 2.917381 1 8.764849 20 0.122711 2.082143 if (FALSE) { # \\dontrun{ # Compare two logistic regression models imp <- mice(boys, maxit = 2, print = FALSE) fit1 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc + reg, family = binomial)) fit0 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc, family = binomial)) D3(fit1, fit0) } # }"},{"path":"https://amices.org/mice/reference/MCAR.html","id":null,"dir":"Reference","previous_headings":"","what":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Test whether missingness contingent upon observed variables, according methodology developed Jamshidian Jalal (2010) (see Details).","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"","code":"mcar( x, imputed = mice(x, method = \"norm\"), min_n = 6, method = \"auto\", replications = 10000, use_chisq = 30, alpha = 0.05 )"},{"path":"https://amices.org/mice/reference/MCAR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"x object method exists; usually data.frame. imputed Either object class mids, returned mice(), list data.frames. min_n Atomic numeric, must greater 1. missing data patterns fewer min_n cases, cases pattern removed x imputed. method Atomic character. known (assumed) data either multivariate normally distributed , use either method = \"hawkins\" method = \"nonparametric\", respectively. default argument method = \"auto\" follows procedure outlined Details section, Figure 7 Jamshidian Jalal (2010). replications Number replications used simulate Neyman distribution performing Hawkins' test. method based random sampling, use high number replications (optionally, set.seed()) minimize Monte Carlo error ensure reproducibility. use_chisq Atomic integer, indicating minimum number cases within group k triggers use asymptotic Chi-square distribution instead emprical distribution Neyman uniformity test, performed part Hawkins' test. alpha Atomic numeric, indicating significance level tests.","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"object class mcar_object.","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Three types missingness distinguished literature (Rubin, 1976): Missing completely random (MCAR), means missingness random; missing random (MAR), means missingness contingent observed; missing random (MNAR), means missingness related unobserved data. Jamshidian Jalal's non-parametric MCAR test assumes missing data either MCAR MAR, tests whether missingness independent observed values. , covariance matrices imputed data equal accross groups different patterns missingness. test consists following procedure: Data imputed. imputed data split k groups according k missing data patterns original data (see md.pattern()). Perform Hawkins' test equality covariances across k groups. test significant, conclude evidence multivariate normality data, MCAR. test significant, multivariate normality data can assumed, can concluded missingness MAR. multivariate normality assumed, perform Anderson-Darling non-parametric test equality covariances across k groups. Anderson-Darling test significant, evidence multivariate normality - evidence MCAR. Anderson-Darling test significant, evidence can concluded missingness MAR. Note , despite name common parlance, MCAR test can indicate whether missingness MCAR MAR. procedure distinguish MCAR MNAR, non-significant result rule MNAR. re-implementation function TestMCARNormality, originally published R-packgage MissMech, removed CRAN. new implementation faster, backend written C++. also enhances functionality original: Multiply imputed data can now used; median p-value test statistic across replications reported, suggested Eekhout, Wiel, Heymans (2017). printing method mcar_object gives warning least one p-value either test significant. case, recommended inspect range p-values, consider potential violations MCAR. plotting method mcar_object provided. plotting method $md.pattern element mcar_object provided.","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Rubin, D. B. (1976). Inference Missing Data. Biometrika, Vol. 63, . 3, pp. 581-592. doi:10.2307/2335739 Eekhout, ., M. . Wiel, & M. W. Heymans (2017). Methods Significance Testing Categorical Covariates Logistic Regression Models Multiple Imputation: Power Applicability Analysis. BMC Medical Research Methodology 17 (1): 129. Jamshidian, M., & Jalal, S. (2010). Tests homoscedasticity, normality, missing completely random incomplete multivariate data. Psychometrika, 75(4), 649–674. doi:10.1007/s11336-010-9175-3","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"Caspar J. Van Lissa","code":""},{"path":"https://amices.org/mice/reference/MCAR.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Jamshidian and Jalal's Non-Parametric MCAR Test — mcar","text":"","code":"res <- mcar(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # Examine test results res #> #> Missing data patterns: 2 used, 3 removed. #> Cases used: 20 #> #> Hawkins' test: median chi^2 (4) = 2.041792, median p = 0.7280723 #> #> #> Interpretation of results: #> Hawkins' test is not significant; there is no evidence to reject the assumptions of multivariate normality and MCAR. # Plot p-values across imputed data sets plot(res) # Plot md patterns used for the test plot(res, type = \"md.pattern\") # Note difference with the raw md.patterns: md.pattern(nhanes) #> age hyp bmi chl #> 13 1 1 1 1 0 #> 3 1 1 1 0 1 #> 1 1 1 0 1 1 #> 1 1 0 0 1 2 #> 7 1 0 0 0 3 #> 0 8 9 10 27"},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputation based on continuous probability functions — ampute.continuous","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"function creates missing data indicator pattern. continuous probability distributions (Van Buuren, 2012, pp. 63, 64) induced weighted sum scores, calculated earlier multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"","code":"ampute.continuous(P, scores, prop, type)"},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"P vector containing pattern numbers cases's candidacies. case, value 1 #patterns given. example, case value 2 candidate missing data pattern 2. scores list containing vectors candidates's weighted sum scores, result underlying function ampute. prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5. type vector strings containing type missingness pattern. Either \"LEFT\", \"MID\", \"TAIL\" '\"RIGHT\". single missingness type entered, patterns created type. missingness types differ patterns, vector missingness types entered. Default RIGHT patterns result ampute.default.type.","code":""},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"list containing vectors 0 case made missing 1 case remain complete. first vector refers first pattern, second vector second pattern, etcetera.","code":""},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.continuous.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputation based on continuous probability functions — ampute.continuous","text":"Rianne Schouten [aut, cre], Gerko Vink [aut], Peter Lugtig [ctb], 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":null,"dir":"Reference","previous_headings":"","what":"Default freq in ampute — ampute.default.freq","title":"Default freq in ampute — ampute.default.freq","text":"Defines default relative frequency vector multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default freq in ampute — ampute.default.freq","text":"","code":"ampute.default.freq(patterns)"},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default freq in ampute — ampute.default.freq","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default freq in ampute — ampute.default.freq","text":"vector length #patterns containing relative frequencies patterns occur. equal probability given pattern.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.freq.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default freq in ampute — ampute.default.freq","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":null,"dir":"Reference","previous_headings":"","what":"Default odds in ampute() — ampute.default.odds","title":"Default odds in ampute() — ampute.default.odds","text":"Defines default odds matrix multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default odds in ampute() — ampute.default.odds","text":"","code":"ampute.default.odds(patterns)"},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default odds in ampute() — ampute.default.odds","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default odds in ampute() — ampute.default.odds","text":"matrix #rows equals #patterns. Default 4 quantiles odds values 1, 2, 3 4, pattern, imitating RIGHT type missingness.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.odds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default odds in ampute() — ampute.default.odds","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":null,"dir":"Reference","previous_headings":"","what":"Default patterns in ampute — ampute.default.patterns","title":"Default patterns in ampute — ampute.default.patterns","text":"function creates default pattern matrix multivariate amputation function ampute().","code":""},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default patterns in ampute — ampute.default.patterns","text":"","code":"ampute.default.patterns(n)"},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default patterns in ampute — ampute.default.patterns","text":"n scalar specifying number variables data.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default patterns in ampute — ampute.default.patterns","text":"square matrix size n 0 indicates variable","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.patterns.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default patterns in ampute — ampute.default.patterns","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":null,"dir":"Reference","previous_headings":"","what":"Default type in ampute() — ampute.default.type","title":"Default type in ampute() — ampute.default.type","text":"Defines default type vector multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default type in ampute() — ampute.default.type","text":"","code":"ampute.default.type(patterns)"},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default type in ampute() — ampute.default.type","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default type in ampute() — ampute.default.type","text":"string vector length #patterns containing missingness types. pattern amputed \"RIGHT\" missingness.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.type.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default type in ampute() — ampute.default.type","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":null,"dir":"Reference","previous_headings":"","what":"Default weights in ampute — ampute.default.weights","title":"Default weights in ampute — ampute.default.weights","text":"Defines default weights matrix multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default weights in ampute — ampute.default.weights","text":"","code":"ampute.default.weights(patterns, mech)"},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default weights in ampute — ampute.default.weights","text":"patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. result ampute.default.patterns. mech string specifying missingness mechanism.","code":""},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default weights in ampute — ampute.default.weights","text":"matrix size #patterns #variables containing weights used calculate weighted sum scores. Equal weights given variables. mechanism MAR, variables amputed weighted 0. MNAR, variables observed weighted 0. mechanism MCAR, weights matrix used. default MAR matrix returned.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.default.weights.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Default weights in ampute — ampute.default.weights","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputation based on discrete probability functions — ampute.discrete","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"function creates missing data indicator pattern. Odds probabilities (Brand, 1999, pp. 110-113) induced weighted sum scores, calculated earlier multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"","code":"ampute.discrete(P, scores, prop, odds)"},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"P vector containing pattern numbers candidates. case, value 1 #patterns given. example, case value 2 candidate missing data pattern 2. scores list containing vectors candidates's weighted sum scores, result underlying function ampute. prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5. odds matrix #patterns defines #rows. row contain odds missing corresponding pattern. amount odds values defines many quantiles sum scores divided. values relative probabilities: quantile odds value 4 probability missing four times higher quantile odds 1. #quantiles may differ patterns, specify NA cells remaining empty. Default 4 quantiles odds values 1, 2, 3 4, result ampute.default.odds.","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"list containing vectors 0 case made missing 1 case remain complete. first vector refers first pattern, second vector second pattern, etcetera.","code":""},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"Brand, J.P.L. (1999). Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.discrete.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputation based on discrete probability functions — ampute.discrete","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate missing data for simulation purposes — ampute","title":"Generate missing data for simulation purposes — ampute","text":"function generates multivariate missing data MCAR, MAR MNAR missing data mechanism. Imputation data sets containing missing values can performed mice.","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate missing data for simulation purposes — ampute","text":"","code":"ampute( data, prop = 0.5, patterns = NULL, freq = NULL, mech = \"MAR\", weights = NULL, std = TRUE, cont = TRUE, type = NULL, odds = NULL, bycases = TRUE, run = TRUE )"},{"path":"https://amices.org/mice/reference/ampute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate missing data for simulation purposes — ampute","text":"data complete data matrix data frame. Values numeric. Categorical variables transformed dummies. prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5. patterns matrix data frame size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. user may specify many patterns desired. One pattern (vector) possible well. Default square matrix size #variables pattern missingness one variable (created ampute.default.patterns). amputation procedure, md.pattern can used investigate missing data patterns data. freq vector length #patterns containing relative frequency patterns occur. example, three missing data patterns, vector c(0.4, 0.4, 0.2), meaning cases missing values, 40 percent pattern 1, 40 percent pattern 2 20 percent pattern 3. vector sum 1. Default equal probability pattern, created ampute.default.freq. mech string specifying missingness mechanism, either \"MCAR\" (Missing Completely Random), \"MAR\" (Missing Random) \"MNAR\" (Missing Random). Default MAR missingness mechanism. weights matrix data frame size #patterns #variables. matrix contains weights used calculate weighted sum scores. MAR mechanism, weights variables made incomplete zero. MNAR mechanism, weights possible value. Furthermore, weights may differ patterns variables. may negative well. Within pattern, relative size values importance. default weights matrix made ampute.default.weights returns matrix equal weights variables. case MAR, variables amputed weighted 0. MNAR, variables observed weighted 0. mechanism MCAR, weights matrix used. std Logical. Whether weighted sum scores calculated standardized data non-standardized data. latter especially advised making use train test sets order prevent leakage. cont Logical. Whether probabilities based continuous discrete distribution. TRUE, probabilities missing based continuous logistic distribution function. ampute.continuous used calculate assign probabilities. probabilities based argument type. FALSE, probabilities missing based discrete distribution (ampute.discrete) based odds argument. Default TRUE. type string vector strings containing type missingness pattern. Either \"LEFT\", \"MID\", \"TAIL\" '\"RIGHT\". single missingness type given, patterns created type. missingness types differ patterns, vector missingness types given. Default RIGHT patterns result ampute.default.type. odds matrix #patterns defines #rows. row contain odds missing corresponding pattern. number odds values defines many quantiles sum scores divided. odds values relative probabilities: quantile odds value 4 probability missing four times higher quantile odds 1. number quantiles may differ patterns, specify NA cells remaining empty. Default 4 quantiles odds values 1, 2, 3 4 created ampute.default.odds. bycases Logical. TRUE, proportion missingness defined terms cases. FALSE, proportion missingness defined terms cells. Default TRUE. run Logical. TRUE, amputations implemented. FALSE, return object contain everything except amputed data set.","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate missing data for simulation purposes — ampute","text":"Returns S3 object class mads-class (multivariate amputed data set)","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate missing data for simulation purposes — ampute","text":"function generates missing values complete data sets. Amputation complete data sets useful evaluation imputation techniques, multiple imputation (performed function mice package). basic strategy underlying multivariate imputation suggested Don Rubin discussions 90's. Brand (1997) created one particular implementation, method found way FCS paper (Van Buuren et al, 2006). recently, univariate amputation procedures used generate missing data complete, simulated data sets. approach, variables made incomplete one variable time. one variable needs amputed, procedure repeated multiple times. univariate approach, difficult relate missingness one variable missingness another variable. multivariate amputation procedure solves issue moreover, justice multivariate nature data sets. Hence, ampute developed perform multivariate amputation. idea behind function specification several missingness patterns. pattern combination variables without missing values (denoted 0 1 respectively). example, one might want create two missingness patterns data set four variables. patterns something like: 0,0,1,1 1,0,1,0. combination zeros ones may occur. Furthermore, researcher specifies proportion missingness, either proportion missing cases proportion missing cells, relative frequency pattern occurs. Consequently, data split multiple subsets, one subset per pattern. Now, case candidate certain missingness pattern, whether case missing values eventually depends specifications. first specifications missing mechanism. three possible mechanisms: missingness depends completely chance (MCAR), missingness depends values observed variables (.e. variables remain complete) (MAR) values variables made incomplete (MNAR). discussion missingness mechanisms related observed data, refer doi:10.1177/0049124118799376 . user specifies missingness mechanism \"MCAR\", candidates equal probability becoming incomplete. \"MAR\" \"MNAR\" mechanism, weighted sum scores calculated. scores linear combination variables. order calculate weighted sum scores, data standardized. reason, data numeric. Second, case, values data set multiplied weights, specified argument weights. weighted scores summed, resulting weighted sum score case. weights may differ patterns may negative zero well. Naturally, case MAR mechanism, weights corresponding variables made incomplete, 0. Note may different pattern. case MNAR missingness, especially weights variables made incomplete importance. However, variables may weighted well. relative difference weights result effect sum scores. example, first missing data pattern mentioned , weights third fourth variables set 2 4. However, weight values 0.2 0.4 exact effect weighted sum score: fourth variable weighted twice much variable 3. Based weighted sum scores, either discrete continuous distribution probabilities used calculate whether candidate missing values. discrete distribution probabilities, weighted sum scores divided subgroups equal size (quantiles). Thereafter, user specifies subgroup odds missing. number subgroups odds values important generation missing data. example, RIGHT-like mechanism, scoring one higher quantiles high missingness odds, whereas MID-like mechanism, central groups higher odds. , size odds values importance, relative distance values. continuous distributions probabilities based logistic distribution function. user can specify type missingness, , , may differ patterns. example explanation arguments interact , refer vignette Generate missing values ampute amputation methodology published doi:10.1080/00949655.2018.1491577","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generate missing data for simulation purposes — ampute","text":"Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. pp. 110-113. Dissertation. Rotterdam: Erasmus University. Schouten, R.M., Lugtig, P Vink, G. (2018) Generating missing values simulation purposes: multivariate amputation procedure. Journal Statistical Computation Simulation, 88(15): 1909-1930. doi:10.1080/00949655.2018.1491577 Schouten, R.M. Vink, G. (2018) Dance Mechanisms: Observed Information Influences Validity Missingness Assumptions. Sociological Methods Research, 50(3): 1243-1258. doi:10.1177/0049124118799376 Van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn, C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76(12): 1049-1064. doi:10.1080/10629360600810434 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Vink, G. (2016) Towards standardized evaluation multiple imputation routines.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate missing data for simulation purposes — ampute","text":"Rianne Schouten [aut, cre], Gerko Vink [aut], Peter Lugtig [ctb], 2016","code":""},{"path":"https://amices.org/mice/reference/ampute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate missing data for simulation purposes — ampute","text":"","code":"# start with a complete data set compl_boys <- cc(boys)[1:3] # Perform amputation with default settings mads_boys <- ampute(data = compl_boys) mads_boys$amp #> age hgt wgt #> 3279 8.859 124.8 31.0 #> 3283 8.867 NA 38.2 #> 3296 8.908 137.8 NA #> 3321 8.999 136.3 26.9 #> 3323 9.004 151.2 48.2 #> 3327 NA 141.4 29.4 #> 3357 9.119 140.0 28.0 #> 3388 9.201 125.8 22.0 #> 3398 9.234 139.8 35.6 #> 3409 9.270 140.4 32.0 #> 3416 9.303 142.2 31.6 #> 3422 9.316 147.4 31.4 #> 3429 9.368 132.7 25.9 #> 3442 9.407 134.4 27.0 #> 3449 9.426 NA 36.5 #> 3455 9.451 136.0 27.5 #> 3460 9.459 142.7 30.8 #> 3481 9.511 144.5 30.3 #> 3484 9.514 140.3 27.8 #> 3486 9.514 138.0 31.0 #> 3494 9.524 140.9 32.7 #> 3525 9.582 134.0 27.5 #> 3533 9.604 139.7 32.6 #> 3547 9.631 139.7 28.7 #> 3609 9.834 142.0 30.3 #> 3651 9.990 149.0 37.3 #> 3664 10.020 137.2 31.7 #> 3710 NA 134.0 26.5 #> 3721 10.154 139.3 30.6 #> 3724 10.160 141.3 39.5 #> 3727 10.171 135.2 31.9 #> 3805 10.398 149.8 34.7 #> 3814 10.422 158.8 NA #> 3827 10.447 148.7 41.0 #> 3834 10.477 142.6 NA #> 3841 10.499 148.6 38.6 #> 3865 10.554 146.3 40.4 #> 3873 10.568 151.0 36.6 #> 3880 10.581 141.2 33.8 #> 3929 10.724 144.1 29.5 #> 3975 10.888 147.0 33.8 #> 3988 NA 149.0 45.6 #> 3991 10.954 145.1 36.2 #> 3994 10.967 137.4 29.6 #> 3995 10.970 151.2 39.2 #> 4006 11.003 134.3 29.1 #> 4009 11.011 148.8 44.2 #> 4059 NA 139.6 32.7 #> 4066 11.143 135.1 25.0 #> 4067 NA 148.3 41.5 #> 4070 11.156 163.0 44.5 #> 4072 11.159 144.5 49.7 #> 4102 NA 151.8 44.4 #> 4122 11.288 159.4 43.4 #> 4173 11.446 147.9 42.2 #> 4174 11.446 NA 43.1 #> 4186 11.482 148.7 37.2 #> 4211 11.545 153.2 NA #> 4238 11.605 155.2 36.7 #> 4240 11.611 151.0 33.8 #> 4253 11.655 160.6 44.4 #> 4255 11.665 144.5 30.8 #> 4266 11.690 148.0 35.2 #> 4293 11.759 153.2 42.8 #> 4301 11.789 135.4 29.7 #> 4302 11.791 152.8 43.5 #> 4312 11.811 145.9 34.8 #> 4318 11.827 151.0 NA #> 4332 11.874 NA 32.5 #> 4349 11.926 156.5 44.5 #> 4399 12.071 151.1 NA #> 4465 12.265 NA 43.3 #> 4481 12.292 145.8 39.2 #> 4487 12.303 NA 44.0 #> 4505 12.375 157.2 61.0 #> 4532 12.457 NA 52.6 #> 4552 12.501 170.5 53.4 #> 4561 12.520 162.1 NA #> 4579 12.574 163.8 NA #> 4585 12.583 163.3 52.6 #> 4591 12.599 155.0 39.0 #> 4646 NA 172.0 79.5 #> 4682 12.821 170.2 56.0 #> 4721 NA 169.5 54.8 #> 4727 12.944 157.0 41.2 #> 4745 12.991 NA 31.1 #> 4748 12.993 155.9 42.3 #> 4752 12.996 158.9 49.1 #> 4809 13.108 164.0 61.7 #> 4823 NA 175.0 65.1 #> 4824 13.127 180.0 57.8 #> 4825 13.130 156.4 40.8 #> 4847 13.188 168.1 53.4 #> 4848 13.190 155.4 42.1 #> 4887 13.275 161.2 37.0 #> 4892 13.300 165.5 41.9 #> 4961 13.489 161.3 41.4 #> 4994 13.552 157.7 46.2 #> 5039 NA 179.0 54.9 #> 5044 13.642 NA 40.6 #> 5048 NA 175.4 74.8 #> 5064 13.686 168.7 46.1 #> 5085 13.749 155.5 36.5 #> 5113 13.839 162.1 NA #> 5126 13.883 176.2 48.1 #> 5130 13.891 174.6 54.2 #> 5133 13.897 181.7 61.9 #> 5147 13.924 144.8 35.1 #> 5159 13.938 156.9 NA #> 5206 NA 170.0 54.7 #> 5219 14.069 NA 59.2 #> 5228 14.083 172.1 50.9 #> 5247 14.121 159.2 42.7 #> 5288 14.209 NA 54.8 #> 5293 14.220 165.5 48.0 #> 5327 14.297 153.2 44.3 #> 5335 14.308 NA 56.0 #> 5343 NA 164.1 49.1 #> 5367 14.412 NA 54.2 #> 5410 14.527 160.7 52.0 #> 5415 14.540 182.4 76.0 #> 5416 14.543 NA 69.5 #> 5417 14.543 176.4 51.0 #> 5420 14.546 NA 61.0 #> 5478 14.669 NA 57.2 #> 5496 14.721 NA 50.7 #> 5509 14.762 168.6 NA #> 5520 NA 173.8 61.7 #> 5522 NA 179.0 66.5 #> 5539 NA 172.7 64.3 #> 5551 14.863 NA 66.3 #> 5567 14.926 177.4 58.3 #> 5585 14.967 NA 88.0 #> 5598 14.997 181.2 NA #> 5602 NA 188.0 91.6 #> 5610 15.025 185.5 NA #> 5612 NA 178.5 54.1 #> 5642 15.099 NA 74.5 #> 5654 15.129 176.9 58.6 #> 5675 NA 176.8 54.8 #> 5710 15.249 NA 89.0 #> 5714 15.266 175.2 62.5 #> 5763 15.411 NA 54.1 #> 5764 15.416 187.2 NA #> 5789 15.474 192.2 80.2 #> 5806 NA 172.0 52.3 #> 5823 15.542 171.0 50.0 #> 5830 15.556 183.3 61.5 #> 5856 15.622 NA 70.5 #> 5857 15.630 NA 52.6 #> 5858 15.633 NA 67.0 #> 5879 15.663 172.7 NA #> 5880 15.668 176.0 63.8 #> 5883 15.674 176.6 56.9 #> 5947 15.838 NA 63.5 #> 5964 15.893 NA 56.0 #> 5971 15.906 NA 57.5 #> 5975 15.912 180.0 65.2 #> 5986 NA 167.8 62.2 #> 6005 15.989 187.8 NA #> 6029 16.049 NA 70.6 #> 6033 NA 183.9 61.5 #> 6036 NA 184.4 68.5 #> 6037 NA 186.5 70.7 #> 6064 16.156 194.3 NA #> 6083 16.235 NA 60.0 #> 6085 16.246 183.5 76.0 #> 6092 NA 177.9 57.0 #> 6117 16.355 171.0 NA #> 6132 16.402 173.6 54.5 #> 6138 NA 195.5 69.0 #> 6141 16.435 175.1 64.5 #> 6166 16.492 188.0 62.5 #> 6185 NA 178.0 65.7 #> 6251 16.717 NA 66.4 #> 6253 NA 192.8 88.3 #> 6262 NA 189.8 70.3 #> 6283 16.807 184.3 77.0 #> 6343 16.966 182.4 63.7 #> 6361 16.999 179.0 68.1 #> 6372 17.018 183.0 NA #> 6416 NA 183.2 69.3 #> 6482 17.333 180.3 76.8 #> 6483 17.336 183.9 66.3 #> 6528 17.440 171.4 NA #> 6539 17.467 NA 55.5 #> 6567 NA 186.5 71.2 #> 6611 17.678 176.4 NA #> 6641 17.749 NA 94.9 #> 6647 NA 196.2 81.0 #> 6686 17.911 181.2 NA #> 6700 17.957 172.2 NA #> 6756 18.121 NA 58.4 #> 6782 18.209 NA 63.4 #> 6789 18.220 187.4 NA #> 6831 18.349 193.6 69.2 #> 6858 18.453 170.5 NA #> 6892 18.551 193.0 NA #> 6923 18.617 188.0 61.9 #> 6963 18.737 191.0 NA #> 6964 18.743 NA 99.0 #> 6977 18.773 NA 69.6 #> 6981 18.792 174.8 56.0 #> 7001 18.850 179.8 NA #> 7032 18.959 185.1 NA #> 7066 NA 180.8 93.8 #> 7068 19.063 NA 72.4 #> 7073 19.077 182.7 NA #> 7101 19.148 186.5 NA #> 7141 19.310 177.1 NA #> 7152 19.367 178.0 NA #> 7161 19.408 192.7 100.1 #> 7173 19.471 191.0 NA #> 7200 19.575 NA 88.9 #> 7221 19.633 NA 75.0 #> 7240 NA 172.5 70.6 #> 7247 19.739 NA 65.5 #> 7293 19.926 NA 117.4 #> 7297 19.934 181.8 NA #> 7319 NA 170.0 68.8 #> 7328 20.030 178.6 71.0 #> 7362 NA 188.7 89.4 #> 7396 NA 185.1 81.1 # Change default matrices as desired my_patterns <- mads_boys$patterns my_patterns[1:3, 2] <- 0 my_weights <- mads_boys$weights my_weights[2, 1] <- 2 my_weights[3, 1] <- 0.5 # Rerun amputation my_mads_boys <- ampute( data = compl_boys, patterns = my_patterns, freq = c(0.3, 0.3, 0.4), weights = my_weights, type = c(\"RIGHT\", \"TAIL\", \"LEFT\") ) my_mads_boys$amp #> age hgt wgt #> 3279 8.859 NA 31.0 #> 3283 8.867 145.0 38.2 #> 3296 8.908 137.8 30.0 #> 3321 8.999 NA NA #> 3323 9.004 151.2 48.2 #> 3327 9.021 NA NA #> 3357 9.119 NA NA #> 3388 9.201 NA NA #> 3398 9.234 NA 35.6 #> 3409 9.270 140.4 32.0 #> 3416 9.303 NA 31.6 #> 3422 9.316 147.4 31.4 #> 3429 9.368 132.7 25.9 #> 3442 9.407 NA 27.0 #> 3449 9.426 NA NA #> 3455 9.451 136.0 27.5 #> 3460 9.459 NA NA #> 3481 9.511 NA NA #> 3484 9.514 NA NA #> 3486 9.514 138.0 31.0 #> 3494 9.524 NA 32.7 #> 3525 9.582 NA 27.5 #> 3533 9.604 139.7 32.6 #> 3547 9.631 139.7 28.7 #> 3609 9.834 142.0 30.3 #> 3651 9.990 149.0 37.3 #> 3664 10.020 NA NA #> 3710 10.132 134.0 26.5 #> 3721 10.154 139.3 30.6 #> 3724 10.160 141.3 39.5 #> 3727 10.171 135.2 31.9 #> 3805 NA NA 34.7 #> 3814 10.422 NA NA #> 3827 NA NA 41.0 #> 3834 10.477 142.6 32.5 #> 3841 10.499 NA 38.6 #> 3865 10.554 146.3 40.4 #> 3873 10.568 151.0 36.6 #> 3880 10.581 NA 33.8 #> 3929 10.724 NA 29.5 #> 3975 10.888 147.0 33.8 #> 3988 NA NA 45.6 #> 3991 10.954 NA NA #> 3994 10.967 137.4 29.6 #> 3995 10.970 151.2 39.2 #> 4006 11.003 134.3 29.1 #> 4009 11.011 NA NA #> 4059 11.126 139.6 32.7 #> 4066 11.143 135.1 25.0 #> 4067 11.143 NA 41.5 #> 4070 11.156 NA NA #> 4072 11.159 NA NA #> 4102 NA NA 44.4 #> 4122 11.288 NA 43.4 #> 4173 11.446 147.9 42.2 #> 4174 11.446 NA NA #> 4186 11.482 148.7 37.2 #> 4211 11.545 NA NA #> 4238 11.605 NA NA #> 4240 11.611 151.0 33.8 #> 4253 11.655 NA NA #> 4255 11.665 144.5 30.8 #> 4266 11.690 NA NA #> 4293 11.759 NA NA #> 4301 11.789 135.4 29.7 #> 4302 11.791 152.8 43.5 #> 4312 11.811 145.9 34.8 #> 4318 11.827 151.0 33.0 #> 4332 11.874 NA NA #> 4349 11.926 156.5 44.5 #> 4399 12.071 151.1 34.5 #> 4465 12.265 NA 43.3 #> 4481 12.292 145.8 39.2 #> 4487 12.303 161.4 44.0 #> 4505 NA NA 61.0 #> 4532 NA NA 52.6 #> 4552 12.501 NA NA #> 4561 12.520 162.1 44.1 #> 4579 12.574 163.8 51.6 #> 4585 12.583 NA NA #> 4591 12.599 NA NA #> 4646 12.741 172.0 79.5 #> 4682 12.821 170.2 56.0 #> 4721 12.933 NA 54.8 #> 4727 12.944 NA NA #> 4745 12.991 148.7 31.1 #> 4748 12.993 155.9 42.3 #> 4752 12.996 158.9 49.1 #> 4809 13.108 164.0 61.7 #> 4823 13.127 175.0 65.1 #> 4824 13.127 NA 57.8 #> 4825 NA NA 40.8 #> 4847 13.188 NA 53.4 #> 4848 13.190 155.4 42.1 #> 4887 13.275 NA NA #> 4892 13.300 165.5 41.9 #> 4961 13.489 NA 41.4 #> 4994 13.552 157.7 46.2 #> 5039 13.631 179.0 54.9 #> 5044 13.642 NA 40.6 #> 5048 13.656 175.4 74.8 #> 5064 13.686 NA NA #> 5085 13.749 NA NA #> 5113 13.839 NA 44.9 #> 5126 13.883 176.2 48.1 #> 5130 13.891 174.6 54.2 #> 5133 13.897 181.7 61.9 #> 5147 13.924 144.8 35.1 #> 5159 NA NA 50.0 #> 5206 14.045 NA NA #> 5219 14.069 170.6 59.2 #> 5228 14.083 172.1 50.9 #> 5247 14.121 159.2 42.7 #> 5288 14.209 170.9 54.8 #> 5293 14.220 165.5 48.0 #> 5327 14.297 NA 44.3 #> 5335 14.308 NA NA #> 5343 14.332 164.1 49.1 #> 5367 NA NA 54.2 #> 5410 14.527 160.7 52.0 #> 5415 14.540 182.4 76.0 #> 5416 14.543 173.7 69.5 #> 5417 NA NA 51.0 #> 5420 14.546 NA NA #> 5478 NA NA 57.2 #> 5496 NA NA 50.7 #> 5509 14.762 NA 47.6 #> 5520 14.811 173.8 61.7 #> 5522 14.811 179.0 66.5 #> 5539 14.844 172.7 64.3 #> 5551 14.863 NA 66.3 #> 5567 14.926 177.4 58.3 #> 5585 14.967 174.1 88.0 #> 5598 14.997 NA NA #> 5602 15.003 188.0 91.6 #> 5610 NA NA 62.7 #> 5612 15.028 NA NA #> 5642 NA NA 74.5 #> 5654 15.129 176.9 58.6 #> 5675 15.162 176.8 54.8 #> 5710 NA NA 89.0 #> 5714 15.266 NA 62.5 #> 5763 15.411 NA 54.1 #> 5764 15.416 187.2 80.6 #> 5789 15.474 NA NA #> 5806 NA NA 52.3 #> 5823 15.542 171.0 50.0 #> 5830 15.556 NA NA #> 5856 15.622 184.1 70.5 #> 5857 15.630 174.3 52.6 #> 5858 15.633 186.0 67.0 #> 5879 15.663 NA 58.6 #> 5880 15.668 176.0 63.8 #> 5883 15.674 176.6 56.9 #> 5947 NA NA 63.5 #> 5964 15.893 168.6 56.0 #> 5971 15.906 176.2 57.5 #> 5975 15.912 180.0 65.2 #> 5986 NA NA 62.2 #> 6005 NA NA 64.8 #> 6029 16.049 186.7 70.6 #> 6033 NA NA 61.5 #> 6036 NA NA 68.5 #> 6037 16.068 186.5 70.7 #> 6064 16.156 NA NA #> 6083 16.235 185.4 60.0 #> 6085 16.246 NA NA #> 6092 16.273 NA NA #> 6117 16.355 171.0 59.1 #> 6132 NA NA 54.5 #> 6138 16.427 195.5 69.0 #> 6141 16.435 175.1 64.5 #> 6166 NA NA 62.5 #> 6185 16.544 178.0 65.7 #> 6251 16.717 NA NA #> 6253 16.720 192.8 88.3 #> 6262 16.741 189.8 70.3 #> 6283 16.807 184.3 77.0 #> 6343 16.966 182.4 63.7 #> 6361 16.999 179.0 68.1 #> 6372 17.018 NA 65.5 #> 6416 17.117 NA 69.3 #> 6482 17.333 NA 76.8 #> 6483 17.336 183.9 66.3 #> 6528 17.440 NA NA #> 6539 17.467 173.6 55.5 #> 6567 NA NA 71.2 #> 6611 17.678 NA NA #> 6641 17.749 174.0 94.9 #> 6647 17.757 NA 81.0 #> 6686 NA NA 86.8 #> 6700 17.957 172.2 64.5 #> 6756 NA NA 58.4 #> 6782 18.209 NA NA #> 6789 18.220 187.4 79.0 #> 6831 18.349 NA 69.2 #> 6858 18.453 NA NA #> 6892 18.551 193.0 71.7 #> 6923 18.617 188.0 61.9 #> 6963 NA NA 81.3 #> 6964 18.743 192.0 99.0 #> 6977 NA NA 69.6 #> 6981 18.792 174.8 56.0 #> 7001 18.850 NA 62.6 #> 7032 18.959 NA NA #> 7066 NA NA 93.8 #> 7068 19.063 175.0 72.4 #> 7073 19.077 182.7 70.0 #> 7101 NA NA 71.9 #> 7141 19.310 177.1 60.1 #> 7152 NA NA 78.1 #> 7161 NA NA 100.1 #> 7173 19.471 191.0 87.1 #> 7200 19.575 195.0 88.9 #> 7221 19.633 182.1 75.0 #> 7240 NA NA 70.6 #> 7247 19.739 177.0 65.5 #> 7293 19.926 NA 117.4 #> 7297 19.934 NA NA #> 7319 20.010 NA 68.8 #> 7328 20.030 178.6 71.0 #> 7362 NA NA 89.4 #> 7396 20.281 185.1 81.1"},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputation under a MCAR mechanism — ampute.mcar","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"function creates missing data indicator pattern, based MCAR missingness mechanism. function used multivariate amputation function ampute.","code":""},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"","code":"ampute.mcar(P, patterns, prop)"},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"P vector containing pattern numbers cases' candidates. case, value 1 #patterns given. example, case value 2 candidate missing data pattern 2. patterns matrix size #patterns #variables 0 indicates variable missing values 1 indicates variable remain complete. user may specify many patterns desired. One pattern (vector) also possible. result ampute.default.patterns, default square matrix size #variables pattern missingness one variable . prop scalar specifying proportion missingness. value 0 1. Default missingness proportion 0.5.","code":""},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"list containing vectors 0 case made missing 1 case remain complete. first vector refers first pattern, second vector second pattern, etcetera.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ampute.mcar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputation under a MCAR mechanism — ampute.mcar","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/anova.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare several nested models — anova.mira","title":"Compare several nested models — anova.mira","text":"Compare several nested models","code":""},{"path":"https://amices.org/mice/reference/anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare several nested models — anova.mira","text":"","code":"# S3 method for class 'mira' anova(object, ..., method = \"D1\", use = \"wald\")"},{"path":"https://amices.org/mice/reference/anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare several nested models — anova.mira","text":"object Two objects class mira ... parameters passed D1(), D2(), D3() mitml::testModels. method Either \"D1\", \"D2\" \"D3\" use character indicating test statistic","code":""},{"path":"https://amices.org/mice/reference/anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare several nested models — anova.mira","text":"Object class mice.anova","code":""},{"path":"https://amices.org/mice/reference/appendbreak.html","id":null,"dir":"Reference","previous_headings":"","what":"Appends specified break to the data — appendbreak","title":"Appends specified break to the data — appendbreak","text":"custom function insert rows long data new pseudo-observations done specified break ages. column called first data logical data codes whether current row first subject id. Furthermore, function assumes columns age, occ, hgt.z, wgt.z bmi.z available. function used tbc data FIMD chapter 9. Check see action.","code":""},{"path":"https://amices.org/mice/reference/appendbreak.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Appends specified break to the data — appendbreak","text":"","code":"appendbreak(data, brk, warp.model = warp.model, id = NULL, typ = \"pred\")"},{"path":"https://amices.org/mice/reference/appendbreak.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Appends specified break to the data — appendbreak","text":"data data frame long long format brk vector break ages warp.model time warping model id subject identifier typ Label signal newly added observation","code":""},{"path":"https://amices.org/mice/reference/appendbreak.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Appends specified break to the data — appendbreak","text":"long data frame additional rows break ages","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts an imputed dataset (long format) into a mids object — as.mids","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"function converts imputed data stored long format object class mids. original incomplete dataset needs available know missing data . function useful convert back operations applied imputed data back mids object. may also used store multiply imputed data sets software format used mice.","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"","code":"as.mids(long, where = NULL, .imp = \".imp\", .id = \".id\")"},{"path":"https://amices.org/mice/reference/as.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"long multiply imputed data set long format, example produced call complete(..., action = 'long', include = TRUE), software. data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. .imp optional column number column name long, indicating imputation index. values assumed consecutive integers 0 m. Values 1 m correspond imputation index, value 0 indicates original data (missings). default, procedure search variable named \".imp\". .id optional column number column name long, indicating subject identification. specified, function searches variable named \".id\". variable found, values column define row names data element resulting mids object.","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"object class mids","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"function expects input data long sorted imputation number (variable \".imp\" default), sequence within imputation block.","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/as.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Converts an imputed dataset (long format) into a mids object — as.mids","text":"","code":"# impute the nhanes dataset imp <- mice(nhanes, print = FALSE) # extract the data in long format X <- complete(imp, action = \"long\", include = TRUE) # create dataset with .imp variable as numeric X2 <- X # nhanes example without .id test1 <- as.mids(X) is.mids(test1) #> [1] TRUE identical(complete(test1, action = \"long\", include = TRUE), X) #> [1] TRUE # nhanes example without .id where .imp is numeric test2 <- as.mids(X2) is.mids(test2) #> [1] TRUE identical(complete(test2, action = \"long\", include = TRUE), X) #> [1] TRUE # nhanes example, where we explicitly specify .id as column 2 test3 <- as.mids(X, .id = \".id\") is.mids(test3) #> [1] TRUE identical(complete(test3, action = \"long\", include = TRUE), X) #> [1] TRUE # nhanes example with .id where .imp is numeric test4 <- as.mids(X2, .id = 6) is.mids(test4) #> [1] TRUE identical(complete(test4, action = \"long\", include = TRUE), X) #> [1] TRUE # example without an .id variable # variable .id not preserved X3 <- X[, -6] test5 <- as.mids(X3) is.mids(test5) #> [1] TRUE identical(complete(test5, action = \"long\", include = TRUE)[, -6], X[, -6]) #> [1] TRUE # as() syntax has fewer options test7 <- as(X, \"mids\") test8 <- as(X2, \"mids\") test9 <- as(X2[, -6], \"mids\") rev <- ncol(X):1 test10 <- as(X[, rev], \"mids\") # where argument copies also observed data into $imp element where <- matrix(TRUE, nrow = nrow(nhanes), ncol = ncol(nhanes)) colnames(where) <- colnames(nhanes) test11 <- as.mids(X, where = where) identical(complete(test11, action = \"long\", include = TRUE), X) #> [1] TRUE"},{"path":"https://amices.org/mice/reference/as.mira.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a mira object from repeated analyses — as.mira","title":"Create a mira object from repeated analyses — as.mira","text":".mira() function takes results repeated complete-data analysis stored list, turns mira object can pooled.","code":""},{"path":"https://amices.org/mice/reference/as.mira.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a mira object from repeated analyses — as.mira","text":"","code":"as.mira(fitlist)"},{"path":"https://amices.org/mice/reference/as.mira.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a mira object from repeated analyses — as.mira","text":"fitlist list containing $m$ fitted analysis objects","code":""},{"path":"https://amices.org/mice/reference/as.mira.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a mira object from repeated analyses — as.mira","text":"S3 object class mira.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/as.mira.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a mira object from repeated analyses — as.mira","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts into a mitml.result object — as.mitml.result","title":"Converts into a mitml.result object — as.mitml.result","text":".mitml.result() function takes results repeated complete-data analysis stored list, turns object class mitml.result.","code":""},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts into a mitml.result object — as.mitml.result","text":"","code":"as.mitml.result(x)"},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts into a mitml.result object — as.mitml.result","text":"x object class mira","code":""},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts into a mitml.result object — as.mitml.result","text":"S3 object class mitml.result, list containing $m$ fitted analysis objects.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/as.mitml.result.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Converts into a mitml.result object — as.mitml.result","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":null,"dir":"Reference","previous_headings":"","what":"Growth of Dutch boys — boys","title":"Growth of Dutch boys — boys","text":"Height, weight, head circumference puberty 748 Dutch boys.","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Growth of Dutch boys — boys","text":"data frame 748 rows following 9 variables: age Decimal age (0-21 years) hgt Height (cm) wgt Weight (kg) bmi Body mass index hc Head circumference (cm) gen Genital Tanner stage (G1-G5) phb Pubic hair (Tanner P1-P6) tv Testicular volume (ml) reg Region (north, east, west, south, city)","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Growth of Dutch boys — boys","text":"Fredriks, .M,, van Buuren, S., Burgmeijer, R.J., Meulmeester JF, Beuker, R.J., Brugman, E., Roede, M.J., Verloove-Vanhorick, S.P., Wit, J.M. (2000) Continuing positive secular growth change Netherlands 1955-1997. Pediatric Research, 47, 316-323. Fredriks, .M., van Buuren, S., Wit, J.M., Verloove-Vanhorick, S.P. (2000). Body index measurements 1996-7 compared 1980. Archives Disease Childhood, 82, 107-112.","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Growth of Dutch boys — boys","text":"Random sample 10% cross-sectional data used construct Dutch growth references 1997. Variables gen phb ordered factors. reg factor.","code":""},{"path":"https://amices.org/mice/reference/boys.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Growth of Dutch boys — boys","text":"","code":"# create two imputed data sets imp <- mice(boys, m = 1, maxit = 2) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 2 1 hgt wgt bmi hc gen phb tv reg z <- complete(imp, 1) # create imputations for age <8yrs plot(z$age, z$gen, col = mdc(1:2)[1 + is.na(boys$gen)], xlab = \"Age (years)\", ylab = \"Tanner Stage Genital\" ) # figure to show that the default imputation method does not impute BMI # consistently plot(z$bmi, z$wgt / (z$hgt / 100)^2, col = mdc(1:2)[1 + is.na(boys$bmi)], xlab = \"Imputed BMI\", ylab = \"Calculated BMI\" ) # also, BMI distributions are somewhat different oldpar <- par(mfrow = c(1, 2)) MASS::truehist(z$bmi[!is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(1), xlab = \"BMI observed\" ) MASS::truehist(z$bmi[is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(2), xlab = \"BMI imputed\" ) par(oldpar) # repair the inconsistency problem by passive imputation meth <- imp$meth meth[\"bmi\"] <- \"~I(wgt/(hgt/100)^2)\" pred <- imp$predictorMatrix pred[\"hgt\", \"bmi\"] <- 0 pred[\"wgt\", \"bmi\"] <- 0 imp2 <- mice(boys, m = 1, maxit = 2, meth = meth, pred = pred) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 2 1 hgt wgt bmi hc gen phb tv reg z2 <- complete(imp2, 1) # show that new imputations are consistent plot(z2$bmi, z2$wgt / (z2$hgt / 100)^2, col = mdc(1:2)[1 + is.na(boys$bmi)], ylab = \"Calculated BMI\" ) # and compare distributions oldpar <- par(mfrow = c(1, 2)) MASS::truehist(z2$bmi[!is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(1), xlab = \"BMI observed\" ) MASS::truehist(z2$bmi[is.na(boys$bmi)], h = 1, xlim = c(10, 30), ymax = 0.25, col = mdc(2), xlab = \"BMI imputed\" ) par(oldpar)"},{"path":"https://amices.org/mice/reference/brandsma.html","id":null,"dir":"Reference","previous_headings":"","what":"Brandsma school data used Snijders and Bosker (2012) — brandsma","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"Dataset raw data Snijders Bosker (2012) containing data 4106 pupils attending 216 schools. dataset includes pupils schools missing data.","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"brandsma data frame 4106 rows 14 columns: sch School number pup Pupil ID iqv IQ verbal iqp IQ performal sex Sex pupil ses SES score pupil min Minority member 0/1 rpg Number repeated groups, 0, 1, 2 lpr language score PRE lpo language score POST apr Arithmetic score PRE apo Arithmetic score POST den Denomination classification 1-4 - school level ssi School SES indicator - school level","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"Constructed MLbook_2nded_total_4106-99.sav https://www.stats.ox.ac.uk/~snijders/mlbook.htm function data-raw/R/brandsma.R","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"dataset constructed raw data. differences data set used Chapter 4 5 Snijders Bosker: schools included, including five school missing values langpost. Missing denomina codes left missing. Aggregates undefined presence missing data underlying values. Variables ses, iqv iqp original scale, globally centered. aggregate variables school level included. wider selection original variables. Note however source data contain even wider set variables.","code":""},{"path":"https://amices.org/mice/reference/brandsma.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Brandsma school data used Snijders and Bosker (2012) — brandsma","text":"Brandsma, HP Knuver, JWM (1989), Effects school classroom characteristics pupil progress language arithmetic. International Journal Educational Research, 13(7), 777 - 788. Snijders, TAB Bosker RJ (2012). Multilevel Analysis, 2nd Ed. Sage, Los Angeles, 2012.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"Plotting method investigate relation data variables amputed data. function shows amputed values related variable values.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"","code":"# S3 method for class 'mads' bwplot( x, data, which.pat = NULL, standardized = TRUE, descriptives = TRUE, layout = NULL, ... )"},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"x mads (mads-class) object, typically created ampute. data string vector variable names needs plotted. default, variables plotted. .pat scalar vector indicating patterns need plotted. default, patterns plotted. standardized Logical. Whether box--whisker plots need created standardized data . Default TRUE. descriptives Logical. Whether mean, variance n variables need printed. useful examine effect amputation. Default TRUE. layout vector two values indicating boxplots one pattern divided plot. example, c(2, 3) indicates boxplots six variables need placed 3 rows 2 columns. Default 1 row amount columns equal #variables. Note 6 variables, multiple plots created automatically. ... used, consistency generic","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"list containing box--whisker plots. Note new pattern always shown new plot.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"mads object contains information need make desired plots. Check mads-class vignette Multivariate Amputation using Ampute understand contents class object mads.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/bwplot.mads.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Box-and-whisker plot of amputed and non-amputed data — bwplot.mads","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Box-and-whisker plot of observed and imputed data — bwplot.mids","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"Plotting methods imputed data using lattice. bwplot produces box--whisker plots. function automatically separates observed imputed data. functions extend usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"","code":"# S3 method for class 'mids' bwplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, theme = mice.theme(), mayreplicate = TRUE, allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. convenience, stripplot() bwplot formula y~.imp may abbreviated y. applies single y, (yet) work y1+y2~.imp. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. mayreplicate logical indicating whether color, line widths, , may replicated. graphical functions attempt choose \"intelligent\" graphical parameters. example, color can replicated different element, e.g. use reds imputed data. Replication may switched setting flag FALSE, order allow user gain full control. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation.","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/bwplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Box-and-whisker plot of observed and imputed data — bwplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg ### box-and-whisker plot per imputation of all numerical variables bwplot(imp) ### tv (testicular volume), conditional on region bwplot(imp, tv ~ .imp | reg) ### same data, organized in a different way bwplot(imp, tv ~ reg | .imp, theme = list())"},{"path":"https://amices.org/mice/reference/cbind.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine R objects by rows and columns — cbind","title":"Combine R objects by rows and columns — cbind","text":"Functions cbind() rbind() defined mice package order enable dispatch cbind.mids() rbind.mids() one arguments data.frame.","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine R objects by rows and columns — cbind","text":"","code":"cbind(...) rbind(...)"},{"path":"https://amices.org/mice/reference/cbind.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine R objects by rows and columns — cbind","text":"... Arguments passed base::cbind deparse.level integer controlling construction labels case non-matrix-like arguments (default method):deparse.level = 0 constructs labels; default deparse.level = 1 typically deparse.level = 2 always construct labels argument names, see ‘Value’ section .","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine R objects by rows and columns — cbind","text":"S3 object class mids","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine R objects by rows and columns — cbind","text":"standard base::cbind() base::rbind() always dispatch base::cbind.data.frame() base::rbind.data.frame() one arguments data.frame. versions defined mice package intercept user command test whether first argument class \"mids\". , function calls cbind.mids(), respectively rbind.mids(). cases, call forwarded standard functions base package. cbind.mids() function combines two mids objects columnwise single object class mids, combines single mids object vector, matrix, factor data.frame columnwise mids object. arguments cbind.mids() mids-objects, data list components number rows. Also, number imputations (m) identical. second argument matrix, factor vector, transformed data.frame. number rows match data component first argument. cbind.mids() function renames duplicated variable block names appending \".1\", \".2\" duplicated names. rbind.mids() function combines two mids objects rowwise single mids object, combines mids object vector, matrix, factor data frame rowwise mids object. arguments rbind.mids() mids objects, rbind.mids() requires number multiple imputations. addition, data components match. second argument rbind.mids() mids object, columns arguments match. matrix second argument set FALSE, signalling missing values argument imputed. ignore vector second argument set FALSE. Rows inherited second argument therefore influence parameter estimation imputation model future iterations.","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Combine R objects by rows and columns — cbind","text":"cbind.mids() function constructs elements new mids object follows: rbind.mids() function constructs elements new mids object follows:","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Combine R objects by rows and columns — cbind","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/cbind.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Combine R objects by rows and columns — cbind","text":"Karin Groothuis-Oudshoorn, Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/cbind.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine R objects by rows and columns — cbind","text":"","code":"# --- cbind --- # impute four variables at once (default) imp <- mice(nhanes, m = 1, maxit = 1, print = FALSE) imp$predictorMatrix #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 # impute two by two data1 <- nhanes[, c(\"age\", \"bmi\")] data2 <- nhanes[, c(\"hyp\", \"chl\")] imp1 <- mice(data1, m = 2, maxit = 1, print = FALSE) imp2 <- mice(data2, m = 2, maxit = 1, print = FALSE) # Append two solutions imp12 <- cbind(imp1, imp2) # This is a different imputation model imp12$predictorMatrix #> age bmi hyp chl #> age 0 1 0 0 #> bmi 1 0 0 0 #> hyp 0 0 0 1 #> chl 0 0 1 0 # Append the other way around imp21 <- cbind(imp2, imp1) imp21$predictorMatrix #> hyp chl age bmi #> hyp 0 1 0 0 #> chl 1 0 0 0 #> age 0 0 0 1 #> bmi 0 0 1 0 # Append 'forgotten' variable chl data3 <- nhanes[, 1:3] imp3 <- mice(data3, maxit = 1, m = 2, print = FALSE) imp4 <- cbind(imp3, chl = nhanes$chl) # Of course, chl was not imputed head(complete(imp4)) #> age bmi hyp chl #> 1 1 30.1 1 NA #> 2 2 22.7 1 187 #> 3 1 35.3 1 187 #> 4 3 27.5 1 NA #> 5 1 20.4 1 113 #> 6 3 22.7 1 184 # Combine mids object with data frame imp5 <- cbind(imp3, nhanes2) head(complete(imp5)) #> age bmi hyp age.1 bmi.1 hyp.1 chl #> 1 1 30.1 1 20-39 NA NA #> 2 2 22.7 1 40-59 22.7 no 187 #> 3 1 35.3 1 20-39 NA no 187 #> 4 3 27.5 1 60-99 NA NA #> 5 1 20.4 1 20-39 20.4 no 113 #> 6 3 22.7 1 60-99 NA 184 # --- rbind --- imp1 <- mice(nhanes[1:13, ], m = 2, maxit = 1, print = FALSE) #> Warning: Number of logged events: 1 imp5 <- mice(nhanes[1:13, ], m = 2, maxit = 2, print = FALSE) #> Warning: Number of logged events: 1 mylist <- list(age = NA, bmi = NA, hyp = NA, chl = NA) nrow(complete(rbind(imp1, imp5))) #> Warning: iterations differ, so no convergence diagnostics calculated #> [1] 26 nrow(complete(rbind(imp1, mylist))) #> [1] 14 nrow(complete(rbind(imp1, data.frame(mylist)))) #> [1] 14 nrow(complete(rbind(imp1, complete(imp5)))) #> [1] 26"},{"path":"https://amices.org/mice/reference/cc.html","id":null,"dir":"Reference","previous_headings":"","what":"Select complete cases — cc","title":"Select complete cases — cc","text":"Extracts complete cases, also known listwise deletion. cc(x) similar na.omit(x), returns object class input data. Dimensions dropped. extracting incomplete cases, use ici.","code":""},{"path":"https://amices.org/mice/reference/cc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select complete cases — cc","text":"","code":"cc(x)"},{"path":"https://amices.org/mice/reference/cc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select complete cases — cc","text":"x R object. Methods available classes mids, data.frame matrix. Also, x vector.","code":""},{"path":"https://amices.org/mice/reference/cc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select complete cases — cc","text":"vector, matrix data.frame containing data complete cases.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/cc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Select complete cases — cc","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/cc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select complete cases — cc","text":"","code":"# cc(nhanes) # get the 13 complete cases # cc(nhanes$bmi) # extract complete bmi"},{"path":"https://amices.org/mice/reference/cci.html","id":null,"dir":"Reference","previous_headings":"","what":"Complete case indicator — cci","title":"Complete case indicator — cci","text":"complete case indicator useful extracting subset complete cases. function cci(x) calls complete.cases(x). companion function ici() selects incomplete cases.","code":""},{"path":"https://amices.org/mice/reference/cci.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Complete case indicator — cci","text":"","code":"cci(x)"},{"path":"https://amices.org/mice/reference/cci.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Complete case indicator — cci","text":"x R object. Currently supported methods following classes: mids.","code":""},{"path":"https://amices.org/mice/reference/cci.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Complete case indicator — cci","text":"Logical vector indicating complete cases.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/cci.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Complete case indicator — cci","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/cci.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Complete case indicator — cci","text":"","code":"cci(nhanes) # indicator for 13 complete cases #> [1] FALSE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE #> [13] TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE #> [25] TRUE cci(mice(nhanes, maxit = 0)) #> [1] FALSE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE #> [13] TRUE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE TRUE TRUE FALSE #> [25] TRUE f <- cci(nhanes[, c(\"bmi\", \"hyp\")]) # complete data for bmi and hyp nhanes[f, ] # obtain all data from those with complete bmi and hyp #> age bmi hyp chl #> 2 2 22.7 1 187 #> 5 1 20.4 1 113 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 NA #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 NA #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 NA #> 25 2 27.4 1 186"},{"path":"https://amices.org/mice/reference/complete.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts the completed data from a mids object — complete.mids","title":"Extracts the completed data from a mids object — complete.mids","text":"Takes object class mids, fills missing data, returns completed data specified format.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts the completed data from a mids object — complete.mids","text":"","code":"# S3 method for class 'mids' complete( data, action = 1L, include = FALSE, mild = FALSE, order = c(\"last\", \"first\"), ... )"},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts the completed data from a mids object — complete.mids","text":"data object class mids created function mice(). action numeric vector keyword. Numeric values 1 data$m return data imputation number action filled . value action = 0 return original data, missing values. action can also one following keywords: \"\", \"long\", \"broad\" \"repeated\". See Details section interpretation. default action = 1L returns first imputed data set. include logical indicate whether original data missing values included. mild logical indicating whether return value always object class mild. Setting mild = TRUE overrides action keywords \"long\", \"broad\" \"repeated\". default FALSE. order Either \"first\" \"last\". relevant action == \"long\". Writes \".imp\" \".id\" columns 1 2. default order = \"last\". Included backward compatibility \"< mice 3.16.0\". ... Additional arguments. used.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts the completed data from a mids object — complete.mids","text":"Complete data set missing values replaced imputations. data.frame, list data frames class mild.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extracts the completed data from a mids object — complete.mids","text":"argument action can length-1 character, matched one following keywords: \"\" produces mild object imputed data sets. include = TRUE, original data appended first list element; \"long\" produces data set imputed data sets stacked vertically. columns added: 1) .imp, integer, referring imputation number, 2) .id, character, row names data$data; \"stacked\" \"long\" without two additional columns; \"broad\" produces data set imputed data sets stacked horizontally. Columns ordered original data. imputation number appended column name; \"repeated\" \"broad\", columns different order.","code":""},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extracts the completed data from a mids object — complete.mids","text":"Technical note: mice 3.7.5 renamed complete() function complete.mids() exported S3 method generic tidyr::complete(). Name clashes mice::complete() tidyr::complete() longer occur.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/complete.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts the completed data from a mids object — complete.mids","text":"","code":"# obtain first imputed data set sum(is.na(nhanes2)) #> [1] 27 imp <- mice(nhanes2, print = FALSE, maxit = 1) dat <- complete(imp) sum(is.na(dat)) #> [1] 0 # obtain stacked third and fifth imputation dat <- complete(imp, c(3, 5)) # obtain all datasets, with additional identifiers head(complete(imp, \"long\")) #> age bmi hyp chl .imp .id #> 1 20-39 30.1 no 229 1 1 #> 2 40-59 22.7 no 187 1 2 #> 3 20-39 33.2 no 187 1 3 #> 4 60-99 21.7 no 284 1 4 #> 5 20-39 20.4 no 113 1 5 #> 6 60-99 21.7 no 184 1 6 # same, but now as list, mild object dslist <- complete(imp, \"all\") length(dslist) #> [1] 5 # same, but also include the original data dslist <- complete(imp, \"all\", include = TRUE) length(dslist) #> [1] 6 # select original + 3 + 5, store as mild dslist <- complete(imp, c(0, 3, 5), mild = TRUE) names(dslist) #> [1] \"0\" \"3\" \"5\""},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct blocks from formulas and predictorMatrix — construct.blocks","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"helper function attempts find blocks variables specification formulas /predictorMatrix objects. Blocks specified formulas may consist multiple variables. Blocks specified predictorMatrix assumed consist single variables. duplicates names removed, formula specification preferred. predictorMatrix formulas. arguments specify models block, model predictMatrix removed, priority given specification given formulas.","code":""},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"","code":"construct.blocks(formulas = NULL, predictorMatrix = NULL)"},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. predictorMatrix numeric matrix length(blocks) rows ncol(data) columns, containing 0/1 data specifying set predictors used target column. row corresponds variable block, .e., set variables imputed. value 1 means column variable used predictor target block (rows). default, predictorMatrix square matrix ncol(data) rows columns 1's, except diagonal. Note: two-level imputation models (\"2l\" names) codes (e.g, 2 -2) also allowed.","code":""},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"blocks object.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/construct.blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construct blocks from formulas and predictorMatrix — construct.blocks","text":"","code":"form <- list(bmi + hyp ~ chl + age, chl ~ bmi) pred <- make.predictorMatrix(nhanes[, c(\"age\", \"chl\")]) construct.blocks(formulas = form, pred = pred) #> $F1 #> [1] \"bmi\" \"hyp\" #> #> $chl #> [1] \"chl\" #> #> $age #> [1] \"age\" #> #> attr(,\"calltype\") #> F1 chl age #> \"formula\" \"formula\" \"pred\""},{"path":"https://amices.org/mice/reference/convergence.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes convergence diagnostics for a mids object — convergence","title":"Computes convergence diagnostics for a mids object — convergence","text":"Takes object class mids, computes autocorrelation /potential scale reduction factor, returns data.frame specified diagnostic(s) per iteration.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes convergence diagnostics for a mids object — convergence","text":"","code":"convergence(data, diagnostic = \"all\", parameter = \"mean\", ...)"},{"path":"https://amices.org/mice/reference/convergence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes convergence diagnostics for a mids object — convergence","text":"data object class mids created function mice(). diagnostic keyword. One following keywords: \"ac\", \"\", \"gr\" \"psrf\". See Details section interpretation. default diagnostic = \"\" returns autocorrelation potential scale reduction factor per iteration. parameter keyword. One following keywords: \"mean\" \"sd\" evaluate chain means chain standard deviations, respectively. ... Additional arguments. used.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes convergence diagnostics for a mids object — convergence","text":"data.frame autocorrelation /potential scale reduction factor per iteration MICE algorithm.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Computes convergence diagnostics for a mids object — convergence","text":"argument diagnostic can length-1 character, matched one following keywords: \"\" computes lag-1 autocorrelation well potential scale reduction factor (cf. Vehtari et al., 2021) per iteration MICE algorithm; \"ac\" computes autocorrelation per iteration; \"psrf\" computes potential scale reduction factor per iteration; \"gr\" psrf, potential scale reduction factor colloquially called Gelman-Rubin diagnostic. unlikely event perfect convergence, autocorrelation equals zero potential scale reduction factor equals one. interpret convergence diagnostic(s) output function, recommended plot diagnostics (ac /psrf) iteration number (.) per imputed variable (vrb). persistently decreasing trend across iterations indicates potential non-convergence.","code":""},{"path":"https://amices.org/mice/reference/convergence.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Computes convergence diagnostics for a mids object — convergence","text":"Vehtari, ., Gelman, ., Simpson, D., Carpenter, B., & Burkner, P.-C. (2021). Rank-Normalization, Folding, Localization: Improved R Assessing Convergence MCMC. Bayesian Analysis, 1(1), 1-38. https://doi.org/10.1214/20-BA1221","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/convergence.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Computes convergence diagnostics for a mids object — convergence","text":"","code":"if (FALSE) { # \\dontrun{ # obtain imputed data set imp <- mice(nhanes2, print = FALSE) # compute convergence diagnostics convergence(imp) } # }"},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Density plot of observed and imputed data — densityplot.mids","title":"Density plot of observed and imputed data — densityplot.mids","text":"Plotting methods imputed data using lattice. densityplot produces plots densities. function automatically separates observed imputed data. functions extend usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Density plot of observed and imputed data — densityplot.mids","text":"","code":"# S3 method for class 'mids' densityplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, plot.points = FALSE, theme = mice.theme(), mayreplicate = TRUE, thicker = 2.5, allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), panel = lattice::lattice.getOption(\"panel.densityplot\"), default.prepanel = lattice::lattice.getOption(\"prepanel.default.densityplot\"), ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Density plot of observed and imputed data — densityplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. function densityplot use y terms formula. Density plots x1 x2 requested ~ x1 + x2. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. plot.points logical used densityplot signals whether points plotted. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. mayreplicate logical indicating whether color, line widths, , may replicated. graphical functions attempt choose \"intelligent\" graphical parameters. example, color can replicated different element, e.g. use reds imputed data. Replication may switched setting flag FALSE, order allow user gain full control. thicker Used densityplot. Multiplication factor line width observed density. thicker=1 uses thickness observed imputed data. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. panel See xyplot. default.prepanel See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Density plot of observed and imputed data — densityplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Density plot of observed and imputed data — densityplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Density plot of observed and imputed data — densityplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation. densityplot errs empty groups, occurs observations subgroup contain NA. relevant error message : Error density.default: ... need least 2 points select bandwidth automatically. yet workaround problem. Use robust bwplot stripplot replacement.","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Density plot of observed and imputed data — densityplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Density plot of observed and imputed data — densityplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/densityplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Density plot of observed and imputed data — densityplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg ### density plot of head circumference per imputation ### blue is observed, red is imputed densityplot(imp, ~ hc | .imp) ### All combined in one panel. densityplot(imp, ~hc)"},{"path":"https://amices.org/mice/reference/employee.html","id":null,"dir":"Reference","previous_headings":"","what":"Employee selection data — employee","title":"Employee selection data — employee","text":"toy example Craig Enders.","code":""},{"path":"https://amices.org/mice/reference/employee.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Employee selection data — employee","text":"","code":"employee"},{"path":"https://amices.org/mice/reference/employee.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Employee selection data — employee","text":"data frame 20 rows 3 variables: IQ candidate IQ score wbeing candidate well-score jobperf candidate job performance score","code":""},{"path":"https://amices.org/mice/reference/employee.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Employee selection data — employee","text":"Enders (2010), Applied Missing Data Analysis, p. 218","code":""},{"path":"https://amices.org/mice/reference/employee.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Employee selection data — employee","text":"Enders describes data follows: designed data mimic employee selection scenario prospective employees complete IQ test psychological well-questionnaire interview. company subsequently hires applications score upper half IQ distribution, supervisor rates job performance following 6-month probationary period. Note job performance scores missing random (MAR) (.e. individuals lower half IQ distribution never hired, thus performance rating). addition, randomly deleted three well-scores order mimic situation applicant's well-questionnaire inadvertently lost. larger version data set present data.enders.employee.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes least squares parameters — estimice","title":"Computes least squares parameters — estimice","text":"function computes least squares estimates, variance/covariance matrices, residuals degrees freedom according ridge regression, QR decomposition Singular Value Decomposition. function internally called .norm.draw(), can called user-specified imputation function.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes least squares parameters — estimice","text":"","code":"estimice(x, y, ls.meth = \"qr\", ridge = 1e-05, ...)"},{"path":"https://amices.org/mice/reference/estimice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes least squares parameters — estimice","text":"x Matrix (n x p) complete covariates. y Incomplete data vector length n ls.meth method use obtaining least squares estimates. default parameters drawn means QR decomposition. ridge small numerical value specifying size ridge used. default value ridge = 1e-05 represents compromise stability unbiasedness. Decrease ridge data contain many junk variables. Increase ridge highly collinear data. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes least squares parameters — estimice","text":"list containing components c (least squares estimate), r (residuals), v (variance/covariance matrix) df (degrees freedom).","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Computes least squares parameters — estimice","text":"calculating inverse crossproduct predictor matrix, problems may arise. example, taking inverse possible predictor matrix rank deficient, estimation problem computationally singular. function detects error cases automatically falls back adding ridge penalty diagonal crossproduct allow proper calculation inverse.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Computes least squares parameters — estimice","text":"functions adds star variable names mice iteration history signal ridge penalty added. case, also adds entry loggedEvents.","code":""},{"path":"https://amices.org/mice/reference/estimice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Computes least squares parameters — estimice","text":"Gerko Vink, 2018","code":""},{"path":"https://amices.org/mice/reference/extend.formula.html","id":null,"dir":"Reference","previous_headings":"","what":"Extends a formula with predictors — extend.formula","title":"Extends a formula with predictors — extend.formula","text":"Extends formula predictors","code":""},{"path":"https://amices.org/mice/reference/extend.formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extends a formula with predictors — extend.formula","text":"","code":"extend.formula( formula = ~0, predictors = NULL, auxiliary = TRUE, include.intercept = FALSE, ... )"},{"path":"https://amices.org/mice/reference/extend.formula.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extends a formula with predictors — extend.formula","text":"formula formula. formula, formula internally reset ~0. predictors character vector variable names. auxiliary logical indicates whether variables listed predictors added formula main effects. default TRUE. include.intercept logical indicated whether intercept included result.","code":""},{"path":"https://amices.org/mice/reference/extend.formula.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extends a formula with predictors — extend.formula","text":"formula","code":""},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":null,"dir":"Reference","previous_headings":"","what":"Extends formula's with predictor matrix settings — extend.formulas","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"Extends formula's predictor matrix settings","code":""},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"","code":"extend.formulas( formulas, data, blocks, predictorMatrix = NULL, auxiliary = TRUE, include.intercept = FALSE, ... )"},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. data data frame matrix containing incomplete data. Missing values coded NA. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. predictorMatrix numeric matrix length(blocks) rows ncol(data) columns, containing 0/1 data specifying set predictors used target column. row corresponds variable block, .e., set variables imputed. value 1 means column variable used predictor target block (rows). default, predictorMatrix square matrix ncol(data) rows columns 1's, except diagonal. Note: two-level imputation models (\"2l\" names) codes (e.g, 2 -2) also allowed. auxiliary logical indicates whether variables listed predictors added formula main effects. default TRUE. include.intercept logical indicated whether intercept included result. ... Named arguments passed univariate imputation functions.","code":""},{"path":"https://amices.org/mice/reference/extend.formulas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extends formula's with predictor matrix settings — extend.formulas","text":"list formula's","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract broken stick estimates from a lmer object — extractBS","title":"Extract broken stick estimates from a lmer object — extractBS","text":"Extract broken stick estimates lmer object","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract broken stick estimates from a lmer object — extractBS","text":"","code":"extractBS(fit)"},{"path":"https://amices.org/mice/reference/extractBS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract broken stick estimates from a lmer object — extractBS","text":"fit object class lmer","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract broken stick estimates from a lmer object — extractBS","text":"matrix containing broken stick estimates","code":""},{"path":"https://amices.org/mice/reference/extractBS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract broken stick estimates from a lmer object — extractBS","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":null,"dir":"Reference","previous_headings":"","what":"SE Fireworks disaster data — fdd","title":"SE Fireworks disaster data — fdd","text":"Multiple outcomes randomized study reduce post-traumatic stress.","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"SE Fireworks disaster data — fdd","text":"fdd data frame 52 rows 65 columns: id Client number trt Treatment (E=EMDR, C=CBT) pp Per protocol (Y/N) trtp Number parental treatments sex Sex: M/F etn Ethnicity: NL/age Age (years) trauma Trauma count (1-5) prop1 PROPS total score T1 prop2 PROPS total score T2 prop3 PROPS total score T3 crop1 CROPS total score T1 crop2 CROPS total score T2 crop3 CROPS total score T3 masc1 MASC score T1 masc2 MASC score T2 masc3 MASC score T3 cbcl1 CBCL T1 cbcl3 CBCL T3 prs1 PRS total score T1 prs2 PRS total score T2 prs3 PRS total score T3 ypa1 PTSD-RI B intrusive recollection parent T1 ypb1 PTSD-RI C avoidant/numbing parent T1 ypc1 PTSD-RI D hyper-arousal parent T1 yp1 PTSD-RI B+C+D parent T1 ypa2 PTSD-RI B intrusive recollection parent T2 ypb2 PTSD-RI C avoidant/numbing parent T2 ypc2 PTSD-RI D hyper-arousal parent T2 yp2 PTSD-RI B+C+D parent T1 ypa3 PTSD-RI B intrusive recollection parent T3 ypb3 PTSD-RI C avoidant/numbing parent T3 ypc3 PTSD-RI D hyper-arousal parent T3 yp3 PTSD-RI B+C+D parent T3 yca1 PTSD-RI B intrusive recollection child T1 ycb1 PTSD-RI C avoidant/numbing child T1 ycc1 PTSD-RI D hyper-arousal child T1 yc1 PTSD-RI B+C+D child T1 yca2 PTSD-RI B intrusive recollection child T2 ycb2 PTSD-RI C avoidant/numbing child T2 ycc2 PTSD-RI D hyper-arousal child T2 yc2 PTSD-RI B+C+D child T2 yca3 PTSD-RI B intrusive recollection child T3 ycb3 PTSD-RI C avoidant/numbing child T3 ycc3 PTSD-RI D hyper-arousal child T3 yc3 PTSD-RI B+C+D child T3 ypf1 PTSD-RI parent full T1 ypf2 PTSD-RI parent full T2 ypf3 PTSD-RI parent full T3 ypp1 PTSD parent partial T1 ypp2 PTSD parent partial T2 ypp3 PTSD parent partial T3 ycf1 PTSD child full T1 ycf2 PTSD child full T2 ycf3 PTSD child full T3 ycp1 PTSD child partial T1 ycp2 PTSD child partial T2 ycp3 PTSD child partial T3 cbin1 CBCL Internalizing T1 cbin3 CBCL Internalizing T3 cbex1 CBCL Externalizing T1 cbex3 CBCL Externalizing T3 bir1 Birlison T1 bir2 Birlison T2 bir3 Birlison T3 fdd.pred 65 65 binary predictor matrix used impute fdd.","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"SE Fireworks disaster data — fdd","text":"de Roos, C., Greenwald, R., den Hollander-Gijsman, M., Noorthoorn, E., van Buuren, S., de Jong, . (2011). Randomised Comparison Cognitive Behavioral Therapy (CBT) Eye Movement Desensitisation Reprocessing (EMDR) disaster-exposed children. European Journal Psychotraumatology, 2, 5694. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Boca Raton, FL.: Chapman & Hall/CRC Press.","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"SE Fireworks disaster data — fdd","text":"Data randomized experiment reduce post-traumatic stress two treatments: Eye Movement Desensitization Reprocessing (EMDR) (experimental treatment), cognitive behavioral therapy (CBT) (control treatment). 52 children randomized one two treatments. Outcomes measured three time points: baseline (pre-treatment, T1), post-treatment (T2, 4-8 weeks), follow-(T3, 3 months). details, see de Roos et al (2011). person covariates reshuffled. imputation methodology explained Chapter 9 van Buuren (2012).","code":""},{"path":"https://amices.org/mice/reference/fdd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"SE Fireworks disaster data — fdd","text":"","code":"data <- fdd md.pattern(fdd) #> id trt pp sex etn age ypf1 ypf2 ypf3 ypp2 ypp3 ycf1 ycf2 ycf3 ycp2 ycp3 trtp #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 #> prop1 prs1 trauma ypp1 ypa1 ypb1 ypc1 yp1 prop2 prs2 ypa2 ypb2 ypc2 yp2 prop3 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 #> 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 #> 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 2 5 5 6 6 6 6 8 8 8 8 8 8 10 #> ypa3 ypb3 ypc3 yp3 cbcl1 cbin1 cbex1 crop1 bir1 cbcl3 cbin3 cbex3 yca1 ycb1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 #> 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 #> 9 1 1 1 1 1 1 1 0 0 1 1 1 0 0 #> 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 #> 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 #> 2 1 1 1 1 0 0 0 0 0 0 0 0 0 0 #> 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 #> 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 #> 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 #> 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 #> 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 #> 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 #> 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 #> 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 #> 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 #> 10 10 10 10 11 11 11 13 14 15 15 15 16 16 #> ycc1 yc1 ycp1 masc1 crop2 crop3 yca2 ycb2 ycc2 yc2 bir2 bir3 prs3 yca3 ycb3 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 #> 8 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 #> 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 9 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 #> 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 #> 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 #> 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 1 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #> 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 #> 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 #> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 #> 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 #> 16 16 16 17 22 22 22 22 22 22 22 22 23 24 24 #> ycc3 yc3 masc2 masc3 #> 8 1 1 1 1 0 #> 2 1 1 0 0 2 #> 1 0 0 1 1 4 #> 8 1 1 1 1 1 #> 1 1 1 0 0 3 #> 1 1 1 1 1 2 #> 1 1 1 1 1 5 #> 1 1 1 1 1 4 #> 9 0 0 0 0 22 #> 1 1 1 1 1 7 #> 1 1 1 1 1 10 #> 2 0 0 0 0 28 #> 1 0 0 0 0 14 #> 1 0 0 0 0 15 #> 1 1 1 1 1 9 #> 1 1 1 0 0 15 #> 1 0 0 0 0 29 #> 1 0 0 0 0 32 #> 1 0 0 0 0 39 #> 1 0 0 0 0 37 #> 1 1 1 1 1 6 #> 1 1 1 1 0 13 #> 1 0 0 0 0 40 #> 1 0 0 0 1 10 #> 1 0 0 0 0 23 #> 1 0 0 0 0 40 #> 1 0 0 0 0 36 #> 1 0 0 0 0 30 #> 24 24 27 27 689"},{"path":"https://amices.org/mice/reference/fdgs.html","id":null,"dir":"Reference","previous_headings":"","what":"Fifth Dutch growth study 2009 — fdgs","title":"Fifth Dutch growth study 2009 — fdgs","text":"Age, height, weight region 10030 children measured within Fifth Dutch Growth Study 2009","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Fifth Dutch growth study 2009 — fdgs","text":"fdgs data frame 10030 rows 8 columns: id Person number reg Region (factor, 5 levels) age Age (years) sex Sex (boy, girl) hgt Height (cm) wgt Weight (kg) hgt.z Height Z-score wgt.z Weight Z-score","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Fifth Dutch growth study 2009 — fdgs","text":"Schonbeck, Y., Talma, H., van Dommelen, P., Bakker, B., Buitendijk, S. E., Hirasing, R. ., van Buuren, S. (2011). Increase prevalence overweight Dutch children adolescents: comparison nationwide growth studies 1980, 1997 2009. PLoS ONE, 6(11), e27608. Schonbeck, Y., Talma, H., van Dommelen, P., Bakker, B., Buitendijk, S. E., Hirasing, R. ., van Buuren, S. (2013). world's tallest nation stopped growing taller: height Dutch children 1955 2009. Pediatric Research, 73(3), 371-377. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Boca Raton, FL.: Chapman & Hall/CRC Press.","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fifth Dutch growth study 2009 — fdgs","text":"data set contains data children Dutch descent (biological parents born Netherlands). Children growth-related diseases excluded. data used construct new growth charts children Dutch descent (Schonbeck 2013), calculate overweight obesity prevalence (Schonbeck 2011). groups underrepresented. Multiple imputation used create synthetic cases used correct nonresponse. See Van Buuren (2012), chapter 8 details.","code":""},{"path":"https://amices.org/mice/reference/fdgs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fifth Dutch growth study 2009 — fdgs","text":"","code":"data <- data(fdgs) summary(data) #> Length Class Mode #> 1 character character"},{"path":"https://amices.org/mice/reference/fico.html","id":null,"dir":"Reference","previous_headings":"","what":"Fraction of incomplete cases among cases with observed — fico","title":"Fraction of incomplete cases among cases with observed — fico","text":"FICO outbound statistic defined fraction incomplete cases among cases Yj observed (White Carlin, 2010).","code":""},{"path":"https://amices.org/mice/reference/fico.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fraction of incomplete cases among cases with observed — fico","text":"","code":"fico(data)"},{"path":"https://amices.org/mice/reference/fico.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fraction of incomplete cases among cases with observed — fico","text":"data data frame matrix containing incomplete data. Missing values coded NA's.","code":""},{"path":"https://amices.org/mice/reference/fico.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fraction of incomplete cases among cases with observed — fico","text":"vector length ncol(data) FICO statistics.","code":""},{"path":"https://amices.org/mice/reference/fico.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fraction of incomplete cases among cases with observed — fico","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. White, .R., Carlin, J.B. (2010). Bias efficiency multiple imputation compared complete-case analysis missing covariate values. Statistics Medicine, 29, 2920-2931.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/fico.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fraction of incomplete cases among cases with observed — fico","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset rows of a mids object — filter.mids","title":"Subset rows of a mids object — filter.mids","text":"function takes mids object returns new mids object pertains subset data identified expression .... expression may use column values incomplete data .data$data.","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset rows of a mids object — filter.mids","text":"","code":"# S3 method for class 'mids' filter(.data, ..., .preserve = FALSE)"},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset rows of a mids object — filter.mids","text":".data mids object. ... Expressions return logical value, defined terms variables .data$data. multiple expressions specified, combined & operator. rows conditions evaluate TRUE kept. .preserve Relevant .data input grouped. .preserve = FALSE (default), grouping structure recalculated based resulting data, otherwise grouping kept .","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset rows of a mids object — filter.mids","text":"S3 object class mids","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Subset rows of a mids object — filter.mids","text":"function calculates logical vector include length nrow(.data$data). function constructs elements filtered mids object follows:","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset rows of a mids object — filter.mids","text":"Patrick Rockenschaub","code":""},{"path":"https://amices.org/mice/reference/filter.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset rows of a mids object — filter.mids","text":"","code":"imp <- mice(nhanes, m = 2, maxit = 1, print = FALSE) # example with external logical vector imp_f <- filter(imp, c(rep(TRUE, 13), rep(FALSE, 12))) nrow(complete(imp)) #> [1] 25 nrow(complete(imp_f)) #> [1] 13 # example with calculated include vector imp_f2 <- filter(imp, age >= 2 & hyp == 1) nrow(complete(imp_f2)) # should be 5 #> [1] 5"},{"path":"https://amices.org/mice/reference/fix.coef.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix coefficients and update model — fix.coef","title":"Fix coefficients and update model — fix.coef","text":"Refits model specified set coefficients.","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix coefficients and update model — fix.coef","text":"","code":"fix.coef(model, beta = NULL)"},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix coefficients and update model — fix.coef","text":"model R model, e.g., produced lm glm beta numeric vector length(coef) model coefficients. vector named, coefficients given order coef(model). vector named, procedure attempts match names.","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix coefficients and update model — fix.coef","text":"updated R model object","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fix coefficients and update model — fix.coef","text":"function calculates linear predictor using new coefficients, reformulates model using offset argument. linear predictor called offset, coefficient 1 definition. new model fits intercept, 0 set beta = coef(model).","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix coefficients and update model — fix.coef","text":"Stef van Buuren, 2018","code":""},{"path":"https://amices.org/mice/reference/fix.coef.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fix coefficients and update model — fix.coef","text":"","code":"model0 <- lm(Volume ~ Girth + Height, data = trees) formula(model0) #> Volume ~ Girth + Height #> coef(model0) #> (Intercept) Girth Height #> -57.9876589 4.7081605 0.3392512 deviance(model0) #> [1] 421.9214 # refit same model model1 <- fix.coef(model0) formula(model1) #> Volume ~ 1 #> coef(model1) #> (Intercept) #> 1.17136e-14 deviance(model1) #> [1] 421.9214 # change the beta's model2 <- fix.coef(model0, beta = c(-50, 5, 1)) coef(model2) #> (Intercept) #> -62.07097 deviance(model2) #> [1] 1098.984 # compare predictions plot(predict(model0), predict(model1)) abline(0, 1) plot(predict(model0), predict(model2)) abline(0, 1) # compare proportion explained variance cor(predict(model0), predict(model0) + residuals(model0))^2 #> [1] 0.94795 cor(predict(model1), predict(model1) + residuals(model1))^2 #> [1] 0.94795 cor(predict(model2), predict(model2) + residuals(model2))^2 #> [1] 0.9228528 # extract offset from constrained model summary(model2$offset) #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 57.00 82.00 87.00 92.24 102.25 140.00 # it also works with factors and missing data model0 <- lm(bmi ~ age + hyp + chl, data = nhanes2) model1 <- fix.coef(model0) model2 <- fix.coef(model0, beta = c(15, -8, -8, 2, 0.2))"},{"path":"https://amices.org/mice/reference/flux.html","id":null,"dir":"Reference","previous_headings":"","what":"Influx and outflux of multivariate missing data patterns — flux","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Influx outflux statistics missing data pattern. statistics useful selecting predictors go imputation model.","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Influx and outflux of multivariate missing data patterns — flux","text":"","code":"flux(data, local = names(data))"},{"path":"https://amices.org/mice/reference/flux.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Influx and outflux of multivariate missing data patterns — flux","text":"data data frame matrix containing incomplete data. Missing values coded NA's. local vector names columns data. default include columns calculations.","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Influx and outflux of multivariate missing data patterns — flux","text":"data frame ncol(data) rows six columns: pobs = Proportion observed, influx = Influx outflux = Outflux ainb = Average inbound statistic aout = Average outbound statistic fico = Fraction incomplete cases among cases Yj observed","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Infux outflux proposed Van Buuren (2018), chapter 4. Influx equal number variable pairs (Yj , Yk) Yj missing Yk observed, divided total number observed data cells. Influx depends proportion missing data variable. Influx completely observed variable equal 0, whereas completely missing variables influx = 1. two variables proportion missing data, variable higher influx better connected observed data, might thus easier impute. Outflux equal number variable pairs Yj observed Yk missing, divided total number incomplete data cells. Outflux indicator potential usefulness Yj imputing variables. Outflux depends proportion missing data variable. Outflux completely observed variable equal 1, whereas outflux completely missing variable equal 0. two variables proportion missing data, variable higher outflux better connected missing data, thus potentially useful imputing variables. FICO outbound statistic defined fraction incomplete cases among cases Yj observed (White Carlin, 2010).","code":""},{"path":"https://amices.org/mice/reference/flux.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. White, .R., Carlin, J.B. (2010). Bias efficiency multiple imputation compared complete-case analysis missing covariate values. Statistics Medicine, 29, 2920-2931.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/flux.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Influx and outflux of multivariate missing data patterns — flux","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Fluxplot of the missing data pattern — fluxplot","title":"Fluxplot of the missing data pattern — fluxplot","text":"Influx outflux statistics missing data pattern. statistics useful selecting predictors go imputation model.","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fluxplot of the missing data pattern — fluxplot","text":"","code":"fluxplot( data, local = names(data), plot = TRUE, labels = TRUE, xlim = c(0, 1), ylim = c(0, 1), las = 1, xlab = \"Influx\", ylab = \"Outflux\", main = paste(\"Influx-outflux pattern for\", deparse(substitute(data))), eqscplot = TRUE, pty = \"s\", lwd = 1, ... )"},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fluxplot of the missing data pattern — fluxplot","text":"data data frame matrix containing incomplete data. Missing values coded NA's. local vector names columns data. default include columns calculations. plot graph produced? labels points labeled? xlim See par. ylim See par. las See par. xlab See par. ylab See par. main See par. eqscplot square plot produced? pty See par. lwd See par. Controls axis line thickness diagonal ... arguments passed plot() eqscplot().","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fluxplot of the missing data pattern — fluxplot","text":"invisible data frame ncol(data) rows six columns: pobs = Proportion observed, influx = Influx outflux = Outflux ainb = Average inbound statistic aout = Average outbound statistic fico = Fraction incomplete cases among cases Yj observed","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fluxplot of the missing data pattern — fluxplot","text":"Infux outflux proposed Van Buuren (2012), chapter 4. Influx equal number variable pairs (Yj , Yk) Yj missing Yk observed, divided total number observed data cells. Influx depends proportion missing data variable. Influx completely observed variable equal 0, whereas completely missing variables influx = 1. two variables proportion missing data, variable higher influx better connected observed data, might thus easier impute. Outflux equal number variable pairs Yj observed Yk missing, divided total number incomplete data cells. Outflux indicator potential usefulness Yj imputing variables. Outflux depends proportion missing data variable. Outflux completely observed variable equal 1, whereas outflux completely missing variable equal 0. two variables proportion missing data, variable higher outflux better connected missing data, thus potentially useful imputing variables.","code":""},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fluxplot of the missing data pattern — fluxplot","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. White, .R., Carlin, J.B. (2010). Bias efficiency multiple imputation compared complete-case analysis missing covariate values. Statistics Medicine, 29, 2920-2931.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/fluxplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fluxplot of the missing data pattern — fluxplot","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function that runs MICE in parallel — futuremice","title":"Wrapper function that runs MICE in parallel — futuremice","text":"wrapper function mice, using multiple cores execute mice parallel. result, imputation procedure can sped , may useful general. default, futuremice distributes number imputations m equally cores.","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function that runs MICE in parallel — futuremice","text":"","code":"futuremice( data, m = 5, parallelseed = NA, n.core = NULL, seed = NA, use.logical = TRUE, future.plan = \"multisession\", packages = NULL, globals = NULL, ... )"},{"path":"https://amices.org/mice/reference/futuremice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function that runs MICE in parallel — futuremice","text":"data data frame matrix containing incomplete data. Similar first argument mice. m number desired imputated datasets. default $m=5$ mice parallelseed scalar used obtain reproducible results futures. default parallelseed = NA result seed value randomly drawn -999999999 999999999. n.core scalar indicating number cores used. seed scalar used seed value mice algorithm within parallel stream. Please note imputations streams , hence, used n.core = 1 desired obtain output mice. use.logical logical indicating whether logical (TRUE) physical (FALSE) CPU's machine used. future.plan character indicating futures resolved. default multisession resolves futures asynchronously (parallel) separate R sessions running background. See plan information future plans. packages character vector additional packages used mice (e.g., using external imputation functions). globals character string additional functions exported future (e.g., user-written imputation functions). ... Named arguments passed function mice.","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function that runs MICE in parallel — futuremice","text":"mids object defined mids-class","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrapper function that runs MICE in parallel — futuremice","text":"function relies package furrr, package R versions 3.2.0 later. chosen use furrr function future_map allow use futuremice Mac, Linux Windows systems. wrapper function combines output future_map function ibind mice package. mids object returned can used analyses. seed value can specified global environment, yield reproducible results. seed value can also specified within futuremice call, specifying argument parallelseed. parallelseed specified, seed value drawn randomly default, accessible $parallelseed output object. Hence, results always reproducible, regardless whether seed specified global environment, setting seed within function (potentially extracting seed futuremice output object.","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wrapper function that runs MICE in parallel — futuremice","text":"Volker, T.B. Vink, G. (2022). futuremice: future starts today. https://www.gerkovink.com/miceVignettes/futuremice/Vignette_futuremice.html Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/futuremice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper function that runs MICE in parallel — futuremice","text":"Thom Benjamin Volker, Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/futuremice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrapper function that runs MICE in parallel — futuremice","text":"","code":"# 150 imputations in dataset nhanes, performed by 3 cores if (FALSE) { # \\dontrun{ imp1 <- futuremice(data = nhanes, m = 150, n.core = 3) # Making use of arguments in mice. imp2 <- futuremice(data = nhanes, m = 100, method = \"norm.nob\") imp2$method fit <- with(imp2, lm(bmi ~ hyp)) pool(fit) } # }"},{"path":"https://amices.org/mice/reference/getfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract list of fitted models — getfit","title":"Extract list of fitted models — getfit","text":"Function getfit() returns list objects containing repeated analysis results, optionally, one fitted objects. function looks list element called analyses, return component list mira class. element analyses found x, returns x mira object.","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract list of fitted models — getfit","text":"","code":"getfit(x, i = -1L, simplify = FALSE)"},{"path":"https://amices.org/mice/reference/getfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract list of fitted models — getfit","text":"x object class mira, typically produced call (). integer 1 x$m signalling index repeated analysis. default = -1 return list analyses. simplify return value unlisted?","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract list of fitted models — getfit","text":"= -1 object class mira containing analyses. selects one analyses, return object whose class inherited element.","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract list of fitted models — getfit","text":"checking done validity objects. function also processes objects class mitml.result mitml package.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/getfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract list of fitted models — getfit","text":"Stef van Buuren, 2012, 2020","code":""},{"path":"https://amices.org/mice/reference/getfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract list of fitted models — getfit","text":"","code":"imp <- mice(nhanes, print = FALSE, seed = 21443) fit <- with(imp, lm(bmi ~ chl + hyp)) f1 <- getfit(fit) class(f1) #> [1] \"mira\" \"list\" f2 <- getfit(fit, 2) class(f2) #> [1] \"lm\""},{"path":"https://amices.org/mice/reference/getqbar.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract estimate from mipo object — getqbar","title":"Extract estimate from mipo object — getqbar","text":"getqbar returns named vector pooled estimates.","code":""},{"path":"https://amices.org/mice/reference/getqbar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract estimate from mipo object — getqbar","text":"","code":"getqbar(x)"},{"path":"https://amices.org/mice/reference/getqbar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract estimate from mipo object — getqbar","text":"x object class mipo","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance method to extract information from a `mipo` object — glance.mipo","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"Glance method extract information `mipo` object","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"","code":"# S3 method for class 'mipo' glance(x, ...)"},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"x object multiply-imputed models `mice` (class: `mipo`) ... extra arguments (used)","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"dataframe one row following columns: nimp nobs","code":""},{"path":"https://amices.org/mice/reference/glance.mipo.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance method to extract information from a `mipo` object — glance.mipo","text":"x contains `lm` models, R2 Adj.R2 included output","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Generalized linear model for mids object — glm.mids","title":"Generalized linear model for mids object — glm.mids","text":"Applies glm() multiply imputed data set","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generalized linear model for mids object — glm.mids","text":"","code":"glm.mids(formula, family = gaussian, data, ...)"},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generalized linear model for mids object — glm.mids","text":"formula formula expression regression models, form response ~ predictors. See documentation lm formula details. family family glm model data object type mids, stands 'multiply imputed data set', typically created function mice(). ... Additional parameters passed glm.","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generalized linear model for mids object — glm.mids","text":"objects class mira, stands 'multiply imputed repeated analysis'. object contains data$m distinct glm.objects, plus descriptive information.","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generalized linear model for mids object — glm.mids","text":"function included backward compatibility V1.0. function superseded .mids.","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Generalized linear model for mids object — glm.mids","text":"Van Buuren, S., Groothuis-Oudshoorn, C.G.M. (2000) Multivariate Imputation Chained Equations: MICE V1.0 User's manual. Leiden: TNO Quality Life.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generalized linear model for mids object — glm.mids","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/glm.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generalized linear model for mids object — glm.mids","text":"","code":"imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # logistic regression on the imputed data fit <- glm.mids((hyp == 2) ~ bmi + chl, data = imp, family = binomial) #> Warning: Use with(imp, glm(yourmodel). fit #> call : #> glm.mids(formula = (hyp == 2) ~ bmi + chl, family = binomial, #> data = imp) #> #> call1 : #> mice(data = nhanes) #> #> nmis : #> age bmi hyp chl #> 0 9 8 10 #> #> analyses : #> [[1]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -4.98053 0.02486 0.01474 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 25.02 #> Residual Deviance: 23.12 \tAIC: 29.12 #> #> [[2]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -7.51505 0.02664 0.02666 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 25.02 #> Residual Deviance: 22.03 \tAIC: 28.03 #> #> [[3]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -7.92351 0.08376 0.02085 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 25.02 #> Residual Deviance: 22.3 \tAIC: 28.3 #> #> [[4]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -7.09719 0.01271 0.02846 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 29.65 #> Residual Deviance: 25.16 \tAIC: 31.16 #> #> [[5]] #> #> Call: glm(formula = formula, family = family, data = complete(data, #> i)) #> #> Coefficients: #> (Intercept) bmi chl #> -2.55325 -0.10346 0.02218 #> #> Degrees of Freedom: 24 Total (i.e. Null); 22 Residual #> Null Deviance:\t 29.65 #> Residual Deviance: 26.23 \tAIC: 32.23 #> #>"},{"path":"https://amices.org/mice/reference/ibind.html","id":null,"dir":"Reference","previous_headings":"","what":"Enlarge number of imputations by combining mids objects — ibind","title":"Enlarge number of imputations by combining mids objects — ibind","text":"function combines two mids objects x y single mids object, objective increasing number imputed data sets. number imputations x y m(x) m(y), combined object m(x)+m(y) imputations.","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enlarge number of imputations by combining mids objects — ibind","text":"","code":"ibind(x, y)"},{"path":"https://amices.org/mice/reference/ibind.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enlarge number of imputations by combining mids objects — ibind","text":"x mids object. y mids object.","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enlarge number of imputations by combining mids objects — ibind","text":"S3 object class mids","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Enlarge number of imputations by combining mids objects — ibind","text":"two mids objects required underlying multiple imputation model fitted data.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ibind.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Enlarge number of imputations by combining mids objects — ibind","text":"Karin Groothuis-Oudshoorn, Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/ibind.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enlarge number of imputations by combining mids objects — ibind","text":"","code":"data(nhanes) imp1 <- mice(nhanes, m = 1, maxit = 2, print = FALSE) imp1$m #> [1] 1 imp2 <- mice(nhanes, m = 3, maxit = 3, print = FALSE) imp2$m #> [1] 3 imp12 <- ibind(imp1, imp2) imp12$m #> [1] 4 plot(imp12)"},{"path":"https://amices.org/mice/reference/ic.html","id":null,"dir":"Reference","previous_headings":"","what":"Select incomplete cases — ic","title":"Select incomplete cases — ic","text":"Extracts incomplete cases data set. companion function selecting complete cases cc.","code":""},{"path":"https://amices.org/mice/reference/ic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Select incomplete cases — ic","text":"","code":"ic(x)"},{"path":"https://amices.org/mice/reference/ic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Select incomplete cases — ic","text":"x R object. Methods available classes mids, data.frame matrix. Also, x vector.","code":""},{"path":"https://amices.org/mice/reference/ic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Select incomplete cases — ic","text":"vector, matrix data.frame containing data complete cases.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Select incomplete cases — ic","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/ic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Select incomplete cases — ic","text":"","code":"ic(nhanes) # get the 12 rows with incomplete cases #> age bmi hyp chl #> 1 1 NA NA NA #> 3 1 NA 1 187 #> 4 3 NA NA NA #> 6 3 NA NA 184 #> 10 2 NA NA NA #> 11 1 NA NA NA #> 12 2 NA NA NA #> 15 1 29.6 1 NA #> 16 1 NA NA NA #> 20 3 25.5 2 NA #> 21 1 NA NA NA #> 24 3 24.9 1 NA ic(nhanes[1:10, ]) # incomplete cases within the first ten rows #> age bmi hyp chl #> 1 1 NA NA NA #> 3 1 NA 1 187 #> 4 3 NA NA NA #> 6 3 NA NA 184 #> 10 2 NA NA NA ic(nhanes[, c(\"bmi\", \"hyp\")]) # restrict extraction to variables bmi and hyp #> bmi hyp #> 1 NA NA #> 3 NA 1 #> 4 NA NA #> 6 NA NA #> 10 NA NA #> 11 NA NA #> 12 NA NA #> 16 NA NA #> 21 NA NA"},{"path":"https://amices.org/mice/reference/ici.html","id":null,"dir":"Reference","previous_headings":"","what":"Incomplete case indicator — ici","title":"Incomplete case indicator — ici","text":"array useful extracting subset incomplete cases. companion function cci() selects complete cases.","code":""},{"path":"https://amices.org/mice/reference/ici.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Incomplete case indicator — ici","text":"","code":"ici(x)"},{"path":"https://amices.org/mice/reference/ici.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Incomplete case indicator — ici","text":"x R object. Currently supported methods following classes: mids.","code":""},{"path":"https://amices.org/mice/reference/ici.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Incomplete case indicator — ici","text":"Logical vector indicating incomplete cases,","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ici.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Incomplete case indicator — ici","text":"Stef van Buuren, 2017.","code":""},{"path":"https://amices.org/mice/reference/ici.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Incomplete case indicator — ici","text":"","code":"ici(nhanes) # indicator for 12 rows with incomplete cases #> [1] TRUE FALSE TRUE TRUE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE #> [13] FALSE FALSE TRUE TRUE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE #> [25] FALSE"},{"path":"https://amices.org/mice/reference/ifdo.html","id":null,"dir":"Reference","previous_headings":"","what":"Conditional imputation helper — ifdo","title":"Conditional imputation helper — ifdo","text":"Sorry, ifdo() function yet implemented.","code":""},{"path":"https://amices.org/mice/reference/ifdo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Conditional imputation helper — ifdo","text":"","code":"ifdo(cond, action)"},{"path":"https://amices.org/mice/reference/ifdo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Conditional imputation helper — ifdo","text":"cond condition action action ","code":""},{"path":"https://amices.org/mice/reference/ifdo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Conditional imputation helper — ifdo","text":"Currently returns error message.","code":""},{"path":"https://amices.org/mice/reference/ifdo.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Conditional imputation helper — ifdo","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/is.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mads object — is.mads","title":"Check for mads object — is.mads","text":"Check mads object","code":""},{"path":"https://amices.org/mice/reference/is.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mads object — is.mads","text":"","code":"is.mads(x)"},{"path":"https://amices.org/mice/reference/is.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mads object — is.mads","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mads object — is.mads","text":"logical indicating whether x object class mads","code":""},{"path":"https://amices.org/mice/reference/is.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mids object — is.mids","title":"Check for mids object — is.mids","text":"Check mids object","code":""},{"path":"https://amices.org/mice/reference/is.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mids object — is.mids","text":"","code":"is.mids(x)"},{"path":"https://amices.org/mice/reference/is.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mids object — is.mids","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mids object — is.mids","text":"logical indicating whether x object class mids","code":""},{"path":"https://amices.org/mice/reference/is.mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mipo object — is.mipo","title":"Check for mipo object — is.mipo","text":"Check mipo object","code":""},{"path":"https://amices.org/mice/reference/is.mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mipo object — is.mipo","text":"","code":"is.mipo(x)"},{"path":"https://amices.org/mice/reference/is.mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mipo object — is.mipo","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mipo object — is.mipo","text":"logical indicating whether x object class mipo","code":""},{"path":"https://amices.org/mice/reference/is.mira.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mira object — is.mira","title":"Check for mira object — is.mira","text":"Check mira object","code":""},{"path":"https://amices.org/mice/reference/is.mira.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mira object — is.mira","text":"","code":"is.mira(x)"},{"path":"https://amices.org/mice/reference/is.mira.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mira object — is.mira","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mira.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mira object — is.mira","text":"logical indicating whether x object class mira","code":""},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":null,"dir":"Reference","previous_headings":"","what":"Check for mitml.result object — is.mitml.result","title":"Check for mitml.result object — is.mitml.result","text":"Check mitml.result object","code":""},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check for mitml.result object — is.mitml.result","text":"","code":"is.mitml.result(x)"},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check for mitml.result object — is.mitml.result","text":"x object","code":""},{"path":"https://amices.org/mice/reference/is.mitml.result.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check for mitml.result object — is.mitml.result","text":"logical indicating whether x object class mitml.result","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":null,"dir":"Reference","previous_headings":"","what":"Leiden 85+ study — leiden85","title":"Leiden 85+ study — leiden85","text":"Subset data Leiden 85+ study","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Leiden 85+ study — leiden85","text":"leiden85 data frame 956 rows 336 columns.","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Leiden 85+ study — leiden85","text":"Lagaay, . M., van der Meij, J. C., Hijmans, W. (1992). Validation medical history taking part population based survey subjects aged 85 . Brit. Med. J., 304(6834), 1091-1092. Izaks, G. J., van Houwelingen, H. C., Schreuder, G. M., Ligthart, G. J. (1997). association human leucocyte antigens (HLA) mortality community residents aged 85 older. Journal American Geriatrics Society, 45(1), 56-60. Boshuizen, H. C., Izaks, G. J., van Buuren, S., Ligthart, G. J. (1998). Blood pressure mortality elderly people aged 85 older: Community based study. Brit. Med. J., 316(7147), 1780-1784. Van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/leiden85.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Leiden 85+ study — leiden85","text":"data set concerns subset 956 members old (85+) cohort Leiden. Multiple imputation data set described Boshuizen et al (1998), Van Buuren et al (1999) Van Buuren (2012), chapter 7. data set available part mice.","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear regression for mids object — lm.mids","title":"Linear regression for mids object — lm.mids","text":"Applies lm() multiply imputed data set","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear regression for mids object — lm.mids","text":"","code":"lm.mids(formula, data, ...)"},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear regression for mids object — lm.mids","text":"formula formula object, response left ~ operator, terms, separated + operators, right. See documentation lm formula details. data object type 'mids', stands 'multiply imputed data set', typically created call function mice(). ... Additional parameters passed lm","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Linear regression for mids object — lm.mids","text":"objects class mira, stands 'multiply imputed repeated analysis'. object contains data$m distinct lm.objects, plus descriptive information.","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear regression for mids object — lm.mids","text":"function included backward compatibility V1.0. function superseded .mids.","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear regression for mids object — lm.mids","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Linear regression for mids object — lm.mids","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/lm.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear regression for mids object — lm.mids","text":"","code":"imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl fit <- lm.mids(bmi ~ hyp + chl, data = imp) #> Warning: Use with(imp, lm(yourmodel). fit #> call : #> lm.mids(formula = bmi ~ hyp + chl, data = imp) #> #> call1 : #> mice(data = nhanes) #> #> nmis : #> age bmi hyp chl #> 0 9 8 10 #> #> analyses : #> [[1]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 21.97200 -2.10751 0.03717 #> #> #> [[2]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 22.39103 -2.07716 0.03741 #> #> #> [[3]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 22.14878 -0.20111 0.02421 #> #> #> [[4]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 23.21196 -2.15281 0.02989 #> #> #> [[5]] #> #> Call: #> lm(formula = formula, data = complete(data, i)) #> #> Coefficients: #> (Intercept) hyp chl #> 20.86029 -3.49178 0.05265 #> #> #>"},{"path":"https://amices.org/mice/reference/mads-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate amputed data set (mads) — mads-class","title":"Multivariate amputed data set (mads) — mads-class","text":"mads object contains amputed data set. mads object generated ampute function. mads class objects methods following generic functions: print, summary, bwplot xyplot.","code":""},{"path":"https://amices.org/mice/reference/mads-class.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multivariate amputed data set (mads) — mads-class","text":"Many functions mice package use S4 class definitions, instead rely S3 list equivalent oldClass(obj) <- \"mads\".","code":""},{"path":"https://amices.org/mice/reference/mads-class.html","id":"contents","dir":"Reference","previous_headings":"","what":"Contents","title":"Multivariate amputed data set (mads) — mads-class","text":"call: function call. prop: Proportion cases missing values. Note: even proportion entered proportion missing cells (bycases == TRUE), object contains proportion missing cases. patterns: data frame size #patterns #variables 0 indicates variable missing values 1 indicates variable remains complete. freq: vector length #patterns containing relative frequency patterns occur. example, vector c(0.4, 0.4, 0.2), means cases missing values, 40 percent candidate pattern 1, 40 percent pattern 2 20 percent pattern 3. vector sums 1. mech: string specifying missingness mechanism, either \"MCAR\", \"MAR\" \"MNAR\". weights: data frame size #patterns #variables. contains weights used calculate weighted sum scores. weights may differ patterns variables. cont: Logical, whether probabilities based continuous logit functions discrete odds distributions. type: vector strings containing type missingness pattern. Either \"LEFT\", \"MID\", \"TAIL\" \"RIGHT\". first type refers first pattern, second type second pattern, etc. odds: matrix #patterns defines #rows. row contains odds missing corresponding pattern. amount odds values defines many quantiles sum scores divided. values relative probabilities: quantile odds value 4 probability missing four times higher quantile odds 1. #quantiles may differ patterns, NA used cells remaining empty. amp: data frame containing input data NAs amputed values. cand: vector contains pattern number case. value 1 #patterns given. example, case value 2 candidate missing data pattern 2. scores: list containing vectors weighted sum scores candidates. first vector refers candidates first pattern, second vector refers candidates second pattern, etc. length vectors differ number candidates different pattern. data: complete data set entered ampute.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mads-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate amputed data set (mads) — mads-class","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a blocks argument — make.blocks","title":"Creates a blocks argument — make.blocks","text":"helper function generates list type needed blocks argument [=mice]{mice} function.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a blocks argument — make.blocks","text":"","code":"make.blocks( data, partition = c(\"scatter\", \"collect\", \"void\"), calltype = \"pred\" )"},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a blocks argument — make.blocks","text":"data data.frame, character vector variable names, list variable names. partition character vector length 1 used assign variables blocks data data.frame. Value \"scatter\" (default) assign column block. Value \"collect\" assigns variables one block, whereas \"void\" produces empty list. calltype character vector length(block) elements indicates imputation model specified. calltype = \"pred\" (default), underlying imputation model called means type argument. type argument block h equivalent row h predictorMatrix. alternative calltype = \"formula\". pass formulas[[h]] underlying imputation function block h, together current data. calltype block set automatically initialization. choice possible, calltype \"formula\" preferred \"pred\" since flexible extendable. However, precisely happens depends also capabilities imputation function called.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a blocks argument — make.blocks","text":"named list character vectors variables names.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates a blocks argument — make.blocks","text":"Choices \"scatter\" \"collect\" represent two extreme scenarios assigning variables imputation blocks. Use \"scatter\" create imputation model based fully conditionally specification (FCS). Use \"collect\" gather variables imputed joint model (JM). Scenario's -two extremes represent hybrid imputation models combine FCS JM. variable listed imputed. Specification \"void\" represents extreme scenario skips imputation variables. variable may member multiple blocks. variable re-imputed block, final imputations variable come last block executed. scenario may useful complete background factors appear multiple imputation blocks. variable may appear multiple times within given block. univariate imputation model applied block, variable re-imputed time appears block.","code":""},{"path":"https://amices.org/mice/reference/make.blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a blocks argument — make.blocks","text":"","code":"make.blocks(nhanes) #> $age #> [1] \"age\" #> #> $bmi #> [1] \"bmi\" #> #> $hyp #> [1] \"hyp\" #> #> $chl #> [1] \"chl\" #> #> attr(,\"calltype\") #> age bmi hyp chl #> \"pred\" \"pred\" \"pred\" \"pred\" make.blocks(c(\"age\", \"sex\", \"edu\")) #> $age #> [1] \"age\" #> #> $sex #> [1] \"sex\" #> #> $edu #> [1] \"edu\" #> #> attr(,\"calltype\") #> age sex edu #> \"pred\" \"pred\" \"pred\""},{"path":"https://amices.org/mice/reference/make.blots.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a blots argument — make.blots","title":"Creates a blots argument — make.blots","text":"helper function creates valid blots object. blots object argument mice function. name blots contraction blocks-dots. blots, user can specify additional arguments specifically passed lowest level imputation function.","code":""},{"path":"https://amices.org/mice/reference/make.blots.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a blots argument — make.blots","text":"","code":"make.blots(data, blocks = make.blocks(data))"},{"path":"https://amices.org/mice/reference/make.blots.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a blots argument — make.blots","text":"data data.frame source data blocks optional specification blocks variables rows. default assigns variable block.","code":""},{"path":"https://amices.org/mice/reference/make.blots.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a blots argument — make.blots","text":"matrix","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.blots.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a blots argument — make.blots","text":"","code":"make.predictorMatrix(nhanes) #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 make.blots(nhanes, blocks = name.blocks(c(\"age\", \"hyp\"), \"xxx\")) #> $age #> list() #> #> $hyp #> list() #>"},{"path":"https://amices.org/mice/reference/make.formulas.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a formulas argument — make.formulas","title":"Creates a formulas argument — make.formulas","text":"helper function creates valid formulas object. formulas object argument mice function. list formula's specifies target variables predictors means standard ~ operator.","code":""},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a formulas argument — make.formulas","text":"","code":"make.formulas(data, blocks = make.blocks(data), predictorMatrix = NULL)"},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a formulas argument — make.formulas","text":"data data.frame source data blocks optional specification blocks variables rows. default assigns variable block. predictorMatrix predictorMatrix specified user.","code":""},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a formulas argument — make.formulas","text":"list formula's.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.formulas.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a formulas argument — make.formulas","text":"","code":"f1 <- make.formulas(nhanes) f1 #> $age #> age ~ bmi + hyp + chl #> #> #> $bmi #> bmi ~ age + hyp + chl #> #> #> $hyp #> hyp ~ age + bmi + chl #> #> #> $chl #> chl ~ age + bmi + hyp #> #> f2 <- make.formulas(nhanes, blocks = make.blocks(nhanes, \"collect\")) f2 #> $collect #> age + bmi + hyp + chl ~ `0` #> #> # for editing, it may be easier to work with the character vector c1 <- as.character(f1) c1 #> [1] \"age ~ bmi + hyp + chl\" \"bmi ~ age + hyp + chl\" \"hyp ~ age + bmi + chl\" #> [4] \"chl ~ age + bmi + hyp\" # fold it back into a formula list f3 <- name.formulas(lapply(c1, as.formula)) f3 #> $age #> age ~ bmi + hyp + chl #> #> #> $bmi #> bmi ~ age + hyp + chl #> #> #> $hyp #> hyp ~ age + bmi + chl #> #> #> $chl #> chl ~ age + bmi + hyp #> #>"},{"path":"https://amices.org/mice/reference/make.method.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a method argument — make.method","title":"Creates a method argument — make.method","text":"helper function creates valid method vector. method vector argument mice function specifies method block.","code":""},{"path":"https://amices.org/mice/reference/make.method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a method argument — make.method","text":"","code":"make.method( data, where = make.where(data), blocks = make.blocks(data), defaultMethod = c(\"pmm\", \"logreg\", \"polyreg\", \"polr\") )"},{"path":"https://amices.org/mice/reference/make.method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a method argument — make.method","text":"data data frame matrix containing incomplete data. Missing values coded NA. data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. defaultMethod vector length 4 containing default imputation methods 1) numeric data, 2) factor data 2 levels, 3) factor data > 2 unordered levels, 4) factor data > 2 ordered levels. default, method uses pmm, predictive mean matching (numeric data) logreg, logistic regression imputation (binary data, factor 2 levels) polyreg, polytomous regression imputation unordered categorical data (factor > 2 levels) polr, proportional odds model (ordered, > 2 levels).","code":""},{"path":"https://amices.org/mice/reference/make.method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a method argument — make.method","text":"Vector length(blocks) element method names","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a method argument — make.method","text":"","code":"make.method(nhanes2) #> age bmi hyp chl #> \"\" \"pmm\" \"logreg\" \"pmm\""},{"path":"https://amices.org/mice/reference/make.post.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a post argument — make.post","title":"Creates a post argument — make.post","text":"helper function creates valid post vector. post vector argument mice function specifies post-processing variable iteration imputation.","code":""},{"path":"https://amices.org/mice/reference/make.post.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a post argument — make.post","text":"","code":"make.post(data)"},{"path":"https://amices.org/mice/reference/make.post.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a post argument — make.post","text":"data data frame matrix containing incomplete data. Missing values coded NA.","code":""},{"path":"https://amices.org/mice/reference/make.post.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a post argument — make.post","text":"Character vector ncol(data) element","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.post.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a post argument — make.post","text":"","code":"make.post(nhanes2) #> age bmi hyp chl #> \"\" \"\" \"\" \"\""},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a predictorMatrix argument — make.predictorMatrix","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"helper function creates valid predictMatrix. predictorMatrix argument mice function. specifies target variable block rows, predictor variables columns. entry 0 means column variable used impute row variable block. nonzero value indicates used.","code":""},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"","code":"make.predictorMatrix(data, blocks = make.blocks(data), predictorMatrix = NULL)"},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"data data.frame source data blocks optional specification blocks variables rows. default assigns variable block. predictorMatrix predictor matrix rows names copied output predictor matrix.","code":""},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"matrix","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.predictorMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a predictorMatrix argument — make.predictorMatrix","text":"","code":"make.predictorMatrix(nhanes) #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 make.predictorMatrix(nhanes, blocks = make.blocks(nhanes, \"collect\")) #> age bmi hyp chl #> collect 1 1 1 1"},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a visitSequence argument — make.visitSequence","title":"Creates a visitSequence argument — make.visitSequence","text":"helper function creates valid visitSequence. visitSequence argument mice function specifies sequence blocks imputed.","code":""},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a visitSequence argument — make.visitSequence","text":"","code":"make.visitSequence(data = NULL, blocks = NULL)"},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a visitSequence argument — make.visitSequence","text":"data data frame matrix containing incomplete data. Missing values coded NA. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited.","code":""},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a visitSequence argument — make.visitSequence","text":"Vector containing block names","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.visitSequence.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a visitSequence argument — make.visitSequence","text":"","code":"make.visitSequence(nhanes) #> [1] \"age\" \"bmi\" \"hyp\" \"chl\""},{"path":"https://amices.org/mice/reference/make.where.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a where argument — make.where","title":"Creates a where argument — make.where","text":"helper function creates valid matrix. matrix argument mice function. size data specifies values imputed (TRUE) (FALSE).","code":""},{"path":"https://amices.org/mice/reference/make.where.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a where argument — make.where","text":"","code":"make.where(data, keyword = c(\"missing\", \"all\", \"none\", \"observed\"))"},{"path":"https://amices.org/mice/reference/make.where.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a where argument — make.where","text":"data data.frame source data keyword optional keyword, one \"missing\" (missing values imputed), \"observed\" (observed values imputed), \"\" \"none\". default keyword = \"missing\"","code":""},{"path":"https://amices.org/mice/reference/make.where.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a where argument — make.where","text":"matrix logical","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/make.where.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a where argument — make.where","text":"","code":"head(make.where(nhanes), 3) #> age bmi hyp chl #> 1 FALSE TRUE TRUE TRUE #> 2 FALSE FALSE FALSE FALSE #> 3 FALSE TRUE FALSE FALSE # create & analyse synthetic data where <- make.where(nhanes2, \"all\") imp <- mice(nhanes2, m = 10, where = where, print = FALSE, seed = 123 ) fit <- with(imp, lm(chl ~ bmi + age + hyp)) summary(pool.syn(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 131.574797 63.262279 2.0798302 970.66355 0.03780306 #> 2 bmi 1.774018 2.298282 0.7718887 795.99667 0.44040943 #> 3 age40-59 18.895593 20.771314 0.9096966 1513.73872 0.36312737 #> 4 age60-99 29.884250 20.936150 1.4273995 655.88704 0.15394068 #> 5 hypyes 8.784214 21.349328 0.4114515 91.38507 0.68170484"},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":null,"dir":"Reference","previous_headings":"","what":"Mammal sleep data — mammalsleep","title":"Mammal sleep data — mammalsleep","text":"Dataset Allison Cicchetti (1976) 62 mammal species interrelationship sleep, ecological, constitutional variables. dataset contains missing values five variables.","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Mammal sleep data — mammalsleep","text":"mammalsleep data frame 62 rows 11 columns: species Species animal bw Body weight (kg) brw Brain weight (g) sws Slow wave (\"nondreaming\") sleep (hrs/day) ps Paradoxical (\"dreaming\") sleep (hrs/day) ts Total sleep (hrs/day) (sum slow wave paradoxical sleep) mls Maximum life span (years) gt Gestation time (days) pi Predation index (1-5), 1 = least likely preyed upon sei Sleep exposure index (1-5), 1 = least exposed (e.g. animal sleeps well-protected den), 5 = exposed odi Overall danger index (1-5) based two indices information, 1 = least danger (animals), 5 = danger (animals)","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Mammal sleep data — mammalsleep","text":"Allison, T., Cicchetti, D.V. (1976). Sleep Mammals: Ecological Constitutional Correlates. Science, 194(4266), 732-734.","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mammal sleep data — mammalsleep","text":"Allison Cicchetti (1976) investigated interrelationship sleep, ecological, constitutional variables. assessed variables 39 mammalian species. authors concluded slow-wave sleep negatively associated factor related body size. suggests large amounts sleep phase disadvantageous large species. Also, paradoxical sleep (REM sleep) associated factor related predatory danger, suggesting large amounts sleep phase disadvantageous prey species.","code":""},{"path":"https://amices.org/mice/reference/mammalsleep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mammal sleep data — mammalsleep","text":"","code":"sleep <- data(mammalsleep)"},{"path":"https://amices.org/mice/reference/matchindex.html","id":null,"dir":"Reference","previous_headings":"","what":"Find index of matched donor units — matchindex","title":"Find index of matched donor units — matchindex","text":"Find index matched donor units","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find index of matched donor units — matchindex","text":"","code":"matchindex(d, t, k = 5L)"},{"path":"https://amices.org/mice/reference/matchindex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find index of matched donor units — matchindex","text":"d Numeric vector values donor cases. t Numeric vector values target cases. k Integer, number unique donors random draw made. k = 1 function returns index d corresponding closest unit. multiple imputation, advice set values range k = 5 k = 10.","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find index of matched donor units — matchindex","text":"integer vector length(t) elements. element index array d.","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find index of matched donor units — matchindex","text":"element t, method finds k nearest neighbours d, randomly draws one neighbours, returns position vector d. Fast predictive mean matching algorithm seven steps: 1. Shuffle records remove effects ties 2. Obtain sorting order shuffled data 3. Calculate index input data sort 4. Pre-sample vector h values 1 k n0 elements t: 5. find two adjacent neighbours 6. find h_i'th nearest neighbour 7. store index neighbour Return vector n0 positions d. may use function perform predictive mean matching given predictive model. , specify d t predictions model. Suppose y contains observed outcomes donor cases (sequence d), y[matchindex(d, t)] returns one matched outcome every target case. See https://github.com/amices/mice/issues/236. function replacement matcher() function default mice since version 2.22 (June 2014).","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find index of matched donor units — matchindex","text":"Stef van Buuren, Nasinski Maciej, Alexander Robitzsch","code":""},{"path":"https://amices.org/mice/reference/matchindex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find index of matched donor units — matchindex","text":"","code":"set.seed(1) # Inputs need not be sorted d <- c(-5, 5, 0, 10, 12) t <- c(-6, -4, 0, 2, 4, -2, 6) # Index (in vector a) of closest match idx <- matchindex(d, t, 1) idx #> [1] 1 1 3 3 2 3 2 # To check: show values of closest match # Random draw among indices of the 5 closest predictors matchindex(d, t) #> [1] 3 1 5 5 2 3 1 # An example train <- mtcars[1:20, ] test <- mtcars[21:32, ] fit <- lm(mpg ~ disp + cyl, data = train) d <- fitted.values(fit) t <- predict(fit, newdata = test) # note: not using mpg idx <- matchindex(d, t) # Borrow values from train to produce 12 synthetic values for mpg in test. # Synthetic values are plausible values that could have been observed if # they had been measured. train$mpg[idx] #> [1] 22.8 15.2 16.4 18.7 14.3 30.4 22.8 22.8 18.7 21.0 17.3 24.4 # Exercise: Create a distribution of 1000 plausible values for each of the # twelve mpg entries in test, and count how many times the true value # (which we know here) is located within the inter-quartile range of each # distribution. Is your count anywhere close to 500? Why? Why not?"},{"path":"https://amices.org/mice/reference/md.pairs.html","id":null,"dir":"Reference","previous_headings":"","what":"Missing data pattern by variable pairs — md.pairs","title":"Missing data pattern by variable pairs — md.pairs","text":"Number observations per variable pair.","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Missing data pattern by variable pairs — md.pairs","text":"","code":"md.pairs(data)"},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Missing data pattern by variable pairs — md.pairs","text":"data data frame matrix containing incomplete data. Missing values coded NA.","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Missing data pattern by variable pairs — md.pairs","text":"list four components named rr, rm, mr mm. component square numerical matrix containing number observations within four missing data pattern.","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Missing data pattern by variable pairs — md.pairs","text":"four components output value following interpretation: list('rr') response-response, variables observed list('rm') response-missing, row observed, column missing list('mr') missing -response, row missing, column observed list('mm') missing -missing, variables missing","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Missing data pattern by variable pairs — md.pairs","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Missing data pattern by variable pairs — md.pairs","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2009","code":""},{"path":"https://amices.org/mice/reference/md.pairs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Missing data pattern by variable pairs — md.pairs","text":"","code":"pat <- md.pairs(nhanes) pat #> $rr #> age bmi hyp chl #> age 25 16 17 15 #> bmi 16 16 16 13 #> hyp 17 16 17 14 #> chl 15 13 14 15 #> #> $rm #> age bmi hyp chl #> age 0 9 8 10 #> bmi 0 0 0 3 #> hyp 0 1 0 3 #> chl 0 2 1 0 #> #> $mr #> age bmi hyp chl #> age 0 0 0 0 #> bmi 9 0 1 2 #> hyp 8 0 0 1 #> chl 10 3 3 0 #> #> $mm #> age bmi hyp chl #> age 0 0 0 0 #> bmi 0 9 8 7 #> hyp 0 8 8 7 #> chl 0 7 7 10 #> # show that these four matrices decompose the total sample size # for each pair pat$rr + pat$rm + pat$mr + pat$mm #> age bmi hyp chl #> age 25 25 25 25 #> bmi 25 25 25 25 #> hyp 25 25 25 25 #> chl 25 25 25 25 # percentage of usable cases to impute row variable from column variable round(100 * pat$mr / (pat$mr + pat$mm)) #> age bmi hyp chl #> age NaN NaN NaN NaN #> bmi 100 0 11 22 #> hyp 100 0 0 12 #> chl 100 30 30 0"},{"path":"https://amices.org/mice/reference/md.pattern.html","id":null,"dir":"Reference","previous_headings":"","what":"Missing data pattern — md.pattern","title":"Missing data pattern — md.pattern","text":"Display missing-data patterns.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Missing data pattern — md.pattern","text":"","code":"md.pattern(x, plot = TRUE, rotate.names = FALSE)"},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Missing data pattern — md.pattern","text":"x data frame matrix containing incomplete data. Missing values coded NA's. plot missing data pattern made plot. Default `plot = TRUE`. rotate.names Whether variable names plot placed horizontally vertically. Default `rotate.names = FALSE`.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Missing data pattern — md.pattern","text":"matrix ncol(x)+1 columns, row corresponds missing data pattern (1=observed, 0=missing). Rows columns sorted increasing amounts missing information. last column row contain row column counts, respectively.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Missing data pattern — md.pattern","text":"function useful investigating structure missing observations data. specific case, missing data pattern (nearly) monotone. Monotonicity can used simplify imputation model. See Schafer (1997) details. Also, missing pattern suggest variables potentially useful imputation missing entries.","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Missing data pattern — md.pattern","text":"Schafer, J.L. (1997), Analysis multivariate incomplete data. London: Chapman&Hall. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Missing data pattern — md.pattern","text":"Gerko Vink, 2018, based earlier version function Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/md.pattern.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Missing data pattern — md.pattern","text":"","code":"md.pattern(nhanes) #> age hyp bmi chl #> 13 1 1 1 1 0 #> 3 1 1 1 0 1 #> 1 1 1 0 1 1 #> 1 1 0 0 1 2 #> 7 1 0 0 0 3 #> 0 8 9 10 27 # age hyp bmi chl # 13 1 1 1 1 0 # 1 1 1 0 1 1 # 3 1 1 1 0 1 # 1 1 0 0 1 2 # 7 1 0 0 0 3 # 0 8 9 10 27"},{"path":"https://amices.org/mice/reference/mdc.html","id":null,"dir":"Reference","previous_headings":"","what":"Graphical parameter for missing data plots — mdc","title":"Graphical parameter for missing data plots — mdc","text":"mdc returns colors used distinguish observed, missing combined data plotting. mice.theme return partial list named objects can used theme stripplot, bwplot, densityplot xyplot.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Graphical parameter for missing data plots — mdc","text":"","code":"mdc( r = \"observed\", s = \"symbol\", transparent = TRUE, cso = grDevices::hcl(240, 100, 40, 0.7), csi = grDevices::hcl(0, 100, 40, 0.7), csc = \"gray50\", clo = grDevices::hcl(240, 100, 40, 0.8), cli = grDevices::hcl(0, 100, 40, 0.8), clc = \"gray50\" )"},{"path":"https://amices.org/mice/reference/mdc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Graphical parameter for missing data plots — mdc","text":"r numerical character vector. numbers 1-6 request colors follows: 1=cso, 2=csi, 3=csc, 4=clo, 5=cli 6=clc. Alternatively, r may contain strings ' observed', 'missing', '', abbreviations thereof. s character vector containing strings 'symbol' ' line', abbreviations thereof. transparent logical indicating whether alpha-transparency allowed. default TRUE. cso symbol color observed data. default transparent blue. csi symbol color missing imputed data. default transparent red. csc symbol color combined observed imputed data. default grey color. clo line color observed data. default slightly darker transparent blue. cli line color missing imputed data. default slightly darker transparent red. clc line color combined observed imputed data. default grey color.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Graphical parameter for missing data plots — mdc","text":"mdc() returns vector containing color definitions. length output vector calculate length r s. Elements input vectors repeated needed.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Graphical parameter for missing data plots — mdc","text":"function eases consistent use colors plots. default follows Abayomi convention, uses blue observed data, red missing imputed data, black combined data.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Graphical parameter for missing data plots — mdc","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mdc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Graphical parameter for missing data plots — mdc","text":"Stef van Buuren, sept 2012.","code":""},{"path":"https://amices.org/mice/reference/mdc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Graphical parameter for missing data plots — mdc","text":"","code":"# all six colors mdc(1:6) #> [1] \"#006CC2B3\" \"#B61A51B3\" \"gray50\" \"#006CC2CC\" \"#B61A51CC\" \"gray50\" # lines color for observed and missing data mdc(c(\"obs\", \"mis\"), \"lin\") #> [1] \"#006CC2CC\" \"#B61A51CC\""},{"path":"https://amices.org/mice/reference/mice.html","id":null,"dir":"Reference","previous_headings":"","what":"mice: Multivariate Imputation by Chained Equations — mice","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"mice package implements method deal missing data. package creates multiple imputations (replacement values) multivariate missing data. method based Fully Conditional Specification, incomplete variable imputed separate model. MICE algorithm can impute mixes continuous, binary, unordered categorical ordered categorical data. addition, MICE can impute continuous two-level data, maintain consistency imputations means passive imputation. Many diagnostic plots implemented inspect quality imputations. Generates Multivariate Imputations Chained Equations (MICE)","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"","code":"mice( data, m = 5, method = NULL, predictorMatrix, ignore = NULL, where = NULL, blocks, visitSequence = NULL, formulas, blots = NULL, post = NULL, defaultMethod = c(\"pmm\", \"logreg\", \"polyreg\", \"polr\"), maxit = 5, printFlag = TRUE, seed = NA, data.init = NULL, ... )"},{"path":"https://amices.org/mice/reference/mice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"data data frame matrix containing incomplete data. Missing values coded NA. m Number multiple imputations. default m=5. method Can either single string, vector strings length length(blocks), specifying imputation method used column data. specified single string, method used blocks. default imputation method (argument specified) depends measurement level target column, regulated defaultMethod argument. Columns need imputed empty method \"\". See details. predictorMatrix numeric matrix length(blocks) rows ncol(data) columns, containing 0/1 data specifying set predictors used target column. row corresponds variable block, .e., set variables imputed. value 1 means column variable used predictor target block (rows). default, predictorMatrix square matrix ncol(data) rows columns 1's, except diagonal. Note: two-level imputation models (\"2l\" names) codes (e.g, 2 -2) also allowed. ignore logical vector nrow(data) elements indicating rows ignored creating imputation model. default NULL includes rows observed value variable imputed. Rows ignore set TRUE influence parameters imputation model, still imputed. may use ignore argument split data training set (imputation model built) test set (influence imputation model estimates). Note: Multivariate imputation methods, like mice.impute.jomoImpute() mice.impute.panImpute(), honour ignore argument. data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. visitSequence vector block names arbitrary length, specifying sequence blocks imputed one iteration Gibbs sampler. block collection variables. variables members block imputed block visited. variable member multiple blocks re-imputed within iteration. default visitSequence = \"roman\" visits blocks (left right) order appear blocks. One may also use one following keywords: \"arabic\" (right left), \"monotone\" (ordered low high proportion missing data) \"revmonotone\" (reverse monotone). Special case: specify visitSequence = \"monotone\" maxit = 1, procedure edit predictorMatrix conform monotone pattern. Realize convergence one iteration guaranteed missing data pattern actually monotone. procedure check . formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. blots named list alist's can used pass arguments lower level imputation function. entries element blots[[blockname]] passed function called block blockname. post vector strings length ncol(data) specifying expressions strings. string parsed executed within sampler() function post-process imputed values iterations. default vector empty strings, indicating post-processing. Multivariate (block) imputation methods ignore post parameter. defaultMethod vector length 4 containing default imputation methods 1) numeric data, 2) factor data 2 levels, 3) factor data > 2 unordered levels, 4) factor data > 2 ordered levels. default, method uses pmm, predictive mean matching (numeric data) logreg, logistic regression imputation (binary data, factor 2 levels) polyreg, polytomous regression imputation unordered categorical data (factor > 2 levels) polr, proportional odds model (ordered, > 2 levels). maxit scalar giving number iterations. default 5. printFlag TRUE, mice print history console. Use print=FALSE silent computation. seed integer used argument set.seed() offsetting random number generator. Default leave random number generator alone. data.init data frame size type data, without missing data, used initialize imputations start iterative process. default NULL implies starting imputation created simple random draw data. Note specification data.init start m Gibbs sampling streams imputation. ... Named arguments passed univariate imputation functions.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"Returns S3 object class mids (multiply imputed data set)","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"mice package contains functions Inspect missing data pattern Impute missing data m times, resulting m completed data sets Diagnose quality imputed values Analyze completed data set Pool results repeated analyses Store export imputed data various formats Generate simulated incomplete data Incorporate custom imputation methods Generates multiple imputations incomplete multivariate data Gibbs sampling. Missing data can occur anywhere data. algorithm imputes incomplete column (target column) generating 'plausible' synthetic values given columns data. incomplete column must act target column, specific set predictors. default set predictors given target consists columns data. predictors incomplete , recently generated imputations used complete predictors prior imputation target column. separate univariate imputation model can specified column. default imputation method depends measurement level target column. addition , several methods provided. can also write imputation functions, call within algorithm. data may contain categorical variables used regressions variables. algorithm creates dummy variables categories variables, imputes corresponding categorical variable. Built-univariate imputation methods : corresponding functions coded mice library names mice.impute.method, method string name univariate imputation method name, example norm. method argument specifies methods used. j'th column, mice() calls first occurrence paste('mice.impute.', method[j], sep = '') search path. mechanism allows uses write customized imputation function, mice.impute.myfunc. call columns specify method='myfunc'. call , say, column 2 specify method=c('norm','myfunc','logreg',...{}). Skipping imputation: user may skip imputation column setting entry empty method: \"\". complete columns without missing data mice automatically set empty method. Setting t empty method produce imputations column, missing cells remain NA. column contains NA's used predictor imputation model column B, mice produces imputations rows B missing. imputed data B may thus contain NA's. remedy remove column imputation model columns data. can done setting entire column variable predictorMatrix equal zero. Passive imputation: mice() supports special built-method, called passive imputation. method can used ensure data transform always depends recently generated imputations. cases, imputation model may need transformed data addition original data (e.g. log, quadratic, recodes, interaction, sum scores, ). Passive imputation maintains consistency among different transformations data. Passive imputation invoked ~ specified first character string specifies univariate method. mice() interprets entire string, including ~ character, formula argument call model.frame(formula, data[!r[,j],]). provides simple mechanism specifying deterministic dependencies among columns. example, suppose missing entries variables data$height data$weight imputed. body mass index (BMI) can calculated within mice specifying string '~(weight/height^2)' univariate imputation method target column data$bmi. Note ~ mechanism works entries missing values target column. make sure combined observed imputed parts target column make sense. easy way create consistency coding entries target NA, large data sets, inefficient. Note may also need adapt default predictorMatrix evade linear dependencies among predictors cause errors like Error solve.default() Error: system exactly singular. Though strictly needed, often useful specify visitSequence column imputed ~ mechanism visited time one predictors visited. way, deterministic relation columns always synchronized. new argument ls.meth can parsed lower level .norm.draw specify method generating least squares estimates subsequently derived estimates. Argument ls.meth takes one three inputs: \"qr\" QR-decomposition, \"svd\" singular value decomposition \"ridge\" ridge regression. ls.meth defaults ls.meth = \"qr\". Auxiliary predictors formulas specification: given block, formulas specification takes precedence corresponding row predictMatrix argument. precedence , however, restricted subset variables specified terms block formula. variables specified formulas imputed according predictMatrix specification. Variables non-zero type values predictMatrix added main effects formulas, act supplementary covariates imputation model. possible turn behavior specifying argument auxiliary = FALSE.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"main functions :","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"vignettes","dir":"Reference","previous_headings":"","what":"Vignettes","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"detailed series six online vignettes walk solving realistic inference problems mice. suggest going vignettes following order Ad hoc methods MICE algorithm Convergence pooling Inspecting observed data missingness related Passive imputation post-processing Imputing multilevel data Sensitivity analysis mice Van Buuren, S. (2018). Boca Raton, FL.: Chapman & Hall/CRC Press. book Flexible Imputation Missing Data. Second Edition. contains lot example code.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"methodology","dir":"Reference","previous_headings":"","what":"Methodology","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"mice software published Journal Statistical Software (Van Buuren Groothuis-Oudshoorn, 2011). doi:10.18637/jss.v045.i03 . first application method concerned missing blood pressure data (Van Buuren et. al., 1999). term Fully Conditional Specification introduced 2006 describe general class methods specify imputations model multivariate data set conditional distributions (Van Buuren et. al., 2006). details mixes variables applications can found book Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"enhanced-linear-algebra","dir":"Reference","previous_headings":"","what":"Enhanced linear algebra","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"Updating BLAS can improve speed R, sometime considerably. details depend operating system. See discussion \"R Installation Administration\" guide information.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064. van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1–67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064. Van Buuren, S. (2007) Multiple imputation discrete continuous data fully conditional specification. Statistical Methods Medical Research, 16, 3, 219–242. Van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"Maintainer: Stef van Buuren stef.vanbuuren@tno.nl Authors: Karin Groothuis-Oudshoorn c.g.m.oudshoorn@utwente.nl contributors: Gerko Vink g.vink@uu.nl [contributor] Rianne Schouten R.M.Schouten@uu.nl [contributor] Alexander Robitzsch robitzsch@ipn.uni-kiel.de [contributor] Patrick Rockenschaub rockenschaub.patrick@gmail.com [contributor] Lisa Doove lisa.doove@ppw.kuleuven.[contributor] Shahab Jolani s.jolani@maastrichtuniversity.nl [contributor] Margarita Moreno-Betancur margarita.moreno@mcri.edu.au [contributor] Ian White ian.white@ucl.ac.uk [contributor] Philipp Gaffert philipp.gaffert@gfk.com [contributor] Florian Meinfelder florian.meinfelder@uni-bamberg.de [contributor] Bernie Gray bfgray3@gmail.com [contributor] Vincent Arel-Bundock vincent.arel-bundock@umontreal.ca [contributor] Mingyang Cai m.cai@uu.nl [contributor] Thom Volker t.b.volker@uu.nl [contributor] Edoardo Costantini e.costantini@tilburguniversity.edu [contributor] Caspar van Lissa c.j.vanlissa@uu.nl [contributor] Hanne Oberman h..oberman@uu.nl [contributor] Stephen Wade stephematician@gmail.com [contributor] Stef van Buuren stef.vanbuuren@tno.nl, Karin Groothuis-Oudshoorn c.g.m.oudshoorn@utwente.nl, 2000-2010, contributions Alexander Robitzsch, Gerko Vink, Shahab Jolani, Roel de Jong, Jason Turner, Lisa Doove, John Fox, Frank E. Harrell, Peter Malewski.","code":""},{"path":"https://amices.org/mice/reference/mice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"mice: Multivariate Imputation by Chained Equations — mice","text":"","code":"# do default multiple imputation on a numeric matrix imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl imp #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"pmm\" \"pmm\" \"pmm\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 # list the actual imputations for BMI imp$imp$bmi #> 1 2 3 4 5 #> 1 29.6 25.5 22.0 30.1 25.5 #> 3 28.7 27.2 29.6 26.3 28.7 #> 4 22.5 21.7 22.5 20.4 25.5 #> 6 25.5 24.9 25.5 25.5 22.5 #> 10 20.4 22.5 28.7 21.7 30.1 #> 11 27.5 27.2 35.3 30.1 27.4 #> 12 27.5 27.2 27.5 22.5 27.4 #> 16 29.6 33.2 28.7 22.0 28.7 #> 21 20.4 22.7 30.1 30.1 33.2 # first completed data matrix complete(imp) #> age bmi hyp chl #> 1 1 29.6 1 238 #> 2 2 22.7 1 187 #> 3 1 28.7 1 187 #> 4 3 22.5 2 186 #> 5 1 20.4 1 113 #> 6 3 25.5 2 184 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 10 2 20.4 1 187 #> 11 1 27.5 1 187 #> 12 2 27.5 1 218 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 238 #> 16 1 29.6 1 238 #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 206 #> 21 1 20.4 1 187 #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 186 #> 25 2 27.4 1 186 # imputation on mixed data with a different method per column mice(nhanes2, meth = c(\"sample\", \"pmm\", \"logreg\", \"norm\")) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"pmm\" \"logreg\" \"norm\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 if (FALSE) { # \\dontrun{ # example where we fit the imputation model on the train data # and apply the model to impute the test data set.seed(123) ignore <- sample(c(TRUE, FALSE), size = 25, replace = TRUE, prob = c(0.3, 0.7)) # scenario 1: train and test in the same dataset imp <- mice(nhanes2, m = 2, ignore = ignore, print = FALSE, seed = 22112) imp.test1 <- filter(imp, ignore) imp.test1$data complete(imp.test1, 1) complete(imp.test1, 2) # scenario 2: train and test in separate datasets traindata <- nhanes2[!ignore, ] testdata <- nhanes2[ignore, ] imp.train <- mice(traindata, m = 2, print = FALSE, seed = 22112) imp.test2 <- mice.mids(imp.train, newdata = testdata) complete(imp.test2, 1) complete(imp.test2, 2) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Imputes univariate systematically sporadically missing data using two-level logistic model using lme4::glmer()","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"","code":"mice.impute.2l.bin(y, ry, x, type, wy = NULL, intercept = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. Random variables identified '2'. class variable (one allowed) coded '-2'. Fixed effects indicated '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. intercept Logical determining whether intercept automatically added. ... Arguments passed glmer","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Data missing systematically measured, e.g., case combine data different sources. Data missing sporadically partially observed.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Jolani S., Debray T.P.., Koffijberg H., van Buuren S., Moons K.G.M. (2015). Imputation systematically missing predictors individual participant data meta-analysis: generalized approach using MICE. Statistics Medicine, 34:1841-1863.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"Shahab Jolani, 2015; adapted mice, SvB, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.bin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by a two-level logistic model using glmer — mice.impute.2l.bin","text":"","code":"library(tidyr) library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union data(\"toenail2\") data <- tidyr::complete(toenail2, patientID, visit) %>% tidyr::fill(treatment) %>% dplyr::select(-time) %>% dplyr::mutate(patientID = as.integer(patientID)) if (FALSE) { # \\dontrun{ pred <- mice(data, print = FALSE, maxit = 0, seed = 1)$pred pred[\"outcome\", \"patientID\"] <- -2 imp <- mice(data, method = \"2l.bin\", pred = pred, maxit = 1, m = 1, seed = 1) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Imputes univariate systematically sporadically missing data using two-level normal model using lme4::lmer().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"","code":"mice.impute.2l.lmer(y, ry, x, type, wy = NULL, intercept = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. Random variables identified '2'. class variable (one allowed) coded '-2'. Fixed effects indicated '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. intercept Logical determining whether intercept automatically added. ... Arguments passed lmer","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Data missing systematically measured, e.g., case combine data different sources. Data missing sporadically partially observed. method fully Bayesian, may fix parameters variance-covariance matrix random effects estimated value cases creating draws posterior possible. procedure throws warning happens. lme4::lmer() fails, procedure prints warning \"lmer run. Simplify imputation model\" returns current imputation. happens see flat lines trace line plots. Thus, appearance flat trace lines taken additional alert problem imputation model fitting.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Jolani S. (2017) Hierarchical imputation systematically sporadically missing data: approximate Bayesian approach using chained equations. Forthcoming. Jolani S., Debray T.P.., Koffijberg H., van Buuren S., Moons K.G.M. (2015). Imputation systematically missing predictors individual participant data meta-analysis: generalized approach using MICE. Statistics Medicine, 34:1841-1863. Van Buuren, S. (2011) Multiple imputation multilevel data. Hox, J.J. Roberts, J.K. (Eds.), Handbook Advanced Multilevel Analysis, Chapter 10, pp. 173–196. Milton Park, UK: Routledge.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.lmer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level normal model using lmer — mice.impute.2l.lmer","text":"Shahab Jolani, 2017","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level normal model — mice.impute.2l.norm","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Imputes univariate missing data using two-level normal model","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"","code":"mice.impute.2l.norm(y, ry, x, type, wy = NULL, intercept = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. Random variables identified '2'. class variable (one allowed) coded '-2'. Random variables also include fixed effect. wy Logical vector length length(y). TRUE value indicates locations y imputations created. intercept Logical determining whether intercept automatically added. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Implements Gibbs sampler linear multilevel model heterogeneous -class variance (Kasim Raudenbush, 1998). Imputations drawn extra step algorithm. simulation work see Van Buuren (2011). random intercept automatically added mice.impute.2L.norm(). model within random intercept can specified mice(..., intercept = FALSE).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Added June 25, 2012: currently implemented algorithm handle predictors specified fixed effects (type=1). using mice.impute.2l.norm(), current advice specify predictors random effects (type=2). Warning: assumption heterogeneous variances requires every class least one observation response y.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Kasim RM, Raudenbush SW. (1998). Application Gibbs sampling nested variance components models heterogeneous within-group variance. Journal Educational Behavioral Statistics, 23(2), 93–116. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2011) Multiple imputation multilevel data. Hox, J.J. Roberts, J.K. (Eds.), Handbook Advanced Multilevel Analysis, Chapter 10, pp. 173–196. Milton Park, UK: Routledge.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level normal model — mice.impute.2l.norm","text":"Roel de Jong, 2008","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Imputes univariate missing data using two-level normal model homogeneous within group variances. Aggregated group effects (.e. group means) can automatically created included predictors two-level regression (see argument type). function needs pan package.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"","code":"mice.impute.2l.pan( y, ry, x, type, intercept = TRUE, paniter = 500, groupcenter.slope = FALSE, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"y Incomplete data vector length n ry Vector missing data pattern (FALSE=missing, TRUE=observed) x Matrix (n x p) complete covariates. type Vector length ncol(x) identifying random class variables. Random effects identified '2'. group variable (one allowed) coded '-2'. Random effects also include fixed effect. covariates X1 group means shall calculated included fixed effects choose '3'. addition effects '3', specification '4' also includes random effects X1. intercept Logical determining whether intercept automatically added. paniter Number iterations pan. Default 500. groupcenter.slope TRUE, case group means (type '3' '4') group mean centering predictors conducted imputations. Default FALSE. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"vector length nmis imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Implements Gibbs sampler linear two-level model homogeneous within group variances special case multivariate linear mixed effects model (Schafer & Yucel, 2002). two-level imputation heterogeneous within-group variances see mice.impute.2l.norm. random intercept automatically added mice.impute.2l.norm().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"function implement functionality. always produces nmis imputation, irrespective argument mice function.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Schafer J L, Yucel RM (2002). Computational strategies multivariate linear mixed-effects models missing values. Journal Computational Graphical Statistics. 11, 437-457. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2l.pan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by a two-level normal model using pan — mice.impute.2l.pan","text":"","code":"# simulate some data # two-level regression model with fixed slope # number of groups G <- 250 # number of persons n <- 20 # regression parameter beta <- .3 # intraclass correlation rho <- .30 # correlation with missing response rho.miss <- .10 # missing proportion missrate <- .50 y1 <- rep(rnorm(G, sd = sqrt(rho)), each = n) + rnorm(G * n, sd = sqrt(1 - rho)) x <- rnorm(G * n) y <- y1 + beta * x dfr0 <- dfr <- data.frame(\"group\" = rep(1:G, each = n), \"x\" = x, \"y\" = y) dfr[rho.miss * x + rnorm(G * n, sd = sqrt(1 - rho.miss)) < qnorm(missrate), \"y\"] <- NA # empty imputation in mice imp0 <- mice(as.matrix(dfr), maxit = 0) predM <- imp0$predictorMatrix impM <- imp0$method # specify predictor matrix and method predM1 <- predM predM1[\"y\", \"group\"] <- -2 predM1[\"y\", \"x\"] <- 1 # fixed x effects imputation impM1 <- impM impM1[\"y\"] <- \"2l.pan\" # multilevel imputation imp1 <- mice(as.matrix(dfr), m = 1, predictorMatrix = predM1, method = impM1, maxit = 1 ) #> #> iter imp variable #> 1 1 y # multilevel analysis library(lme4) #> Loading required package: Matrix #> #> Attaching package: ‘Matrix’ #> The following objects are masked from ‘package:tidyr’: #> #> expand, pack, unpack mod <- lmer(y ~ (1 + x | group) + x, data = complete(imp1)) #> boundary (singular) fit: see help('isSingular') summary(mod) #> Linear mixed model fit by REML ['lmerMod'] #> Formula: y ~ (1 + x | group) + x #> Data: complete(imp1) #> #> REML criterion at convergence: 13126.5 #> #> Scaled residuals: #> Min 1Q Median 3Q Max #> -3.4498 -0.6620 -0.0145 0.6770 3.8518 #> #> Random effects: #> Groups Name Variance Std.Dev. Corr #> group (Intercept) 0.3460124 0.58823 #> x 0.0001001 0.01001 -1.00 #> Residual 0.7169051 0.84670 #> Number of obs: 5000, groups: group, 250 #> #> Fixed effects: #> Estimate Std. Error t value #> (Intercept) 0.03455 0.03908 0.884 #> x 0.29829 0.01247 23.922 #> #> Correlation of Fixed Effects: #> (Intr) #> x -0.045 #> optimizer (nloptwrap) convergence code: 0 (OK) #> boundary (singular) fit: see help('isSingular') #> # Examples of predictorMatrix specification # random x effects # predM1[\"y\",\"x\"] <- 2 # fixed x effects and group mean of x # predM1[\"y\",\"x\"] <- 3 # random x effects and group mean of x # predM1[\"y\",\"x\"] <- 4"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of most likely value within the class — mice.impute.2lonly.mean","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Method 2lonly.mean replicates likely value within class second-level variable. works numeric factor data. function primarily useful quick fixup data second-level variable inconsistent.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"","code":"mice.impute.2lonly.mean(y, ry, x, type, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Vector length ncol(x) identifying random class variables. class variable (one allowed) coded -2. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Observed values y averaged within class, replicated missing y within class. function primarily useful repairing incomplete data constant within class, vary classes. numeric variables, mice.impute.2lonly.mean() imputes class mean y. y second-level variable, conventionally observed y identical within class, function just provides quick fix missing y filling class mean. factor variables, mice.impute.2lonly.mean() imputes frequently occuring category within class. observed y class, entries class set NA. Note may produce problems later mice imputation routines called expects predictor data complete. Methods designed imputing type second-level variables include mice.impute.2lonly.norm mice.impute.2lonly.pmm.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Boca Raton, FL.: Chapman & Hall/CRC Press.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.mean.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of most likely value within the class — mice.impute.2lonly.mean","text":"Gerko Vink, Stef van Buuren, 2019","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"Imputes univariate missing data level 2 using Bayesian linear regression analysis. Variables level 1 aggregated level 2. group identifier level 2 must indicated type = -2 predictorMatrix.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"","code":"mice.impute.2lonly.norm(y, ry, x, type, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Group identifier must specified '-2'. Predictors must specified '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"vector length nmis imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"function allows combination mice.impute.2l.pan switching regression imputation level 1 level 2 described Yucel (2008) Gelman Hill (2007, p. 541). function checks partial missing level-2 data. Level-2 data assumed constant within cluster. one entries missing, procedure aborts error message identifies cluster incomplete level-2 data. cases, one may first fill cluster mean (mode) 2lonly.mean method remove inconsistencies.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"general approach, see miceadds::mice.impute.2lonly.function().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"Gelman, . Hill, J. (2007). Data analysis using regression multilevel/hierarchical models. Cambridge, Cambridge University Press. Yucel, RM (2008). Multiple imputation inference multivariate multilevel continuous data ignorable non-response. Philosophical Transactions Royal Society , 366, 2389-2404. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.norm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation at level 2 by Bayesian linear regression — mice.impute.2lonly.norm","text":"","code":"# simulate some data # x,y ... level 1 variables # v,w ... level 2 variables G <- 250 # number of groups n <- 20 # number of persons beta <- .3 # regression coefficient rho <- .30 # residual intraclass correlation rho.miss <- .10 # correlation with missing response missrate <- .50 # missing proportion y1 <- rep(rnorm(G, sd = sqrt(rho)), each = n) + rnorm(G * n, sd = sqrt(1 - rho)) w <- rep(round(rnorm(G), 2), each = n) v <- rep(round(runif(G, 0, 3)), each = n) x <- rnorm(G * n) y <- y1 + beta * x + .2 * w + .1 * v dfr0 <- dfr <- data.frame(\"group\" = rep(1:G, each = n), \"x\" = x, \"y\" = y, \"w\" = w, \"v\" = v) dfr[rho.miss * x + rnorm(G * n, sd = sqrt(1 - rho.miss)) < qnorm(missrate), \"y\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"w\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"v\"] <- NA # empty mice imputation imp0 <- mice(as.matrix(dfr), maxit = 0) predM <- imp0$predictorMatrix impM <- imp0$method # multilevel imputation predM1 <- predM predM1[c(\"w\", \"y\", \"v\"), \"group\"] <- -2 predM1[\"y\", \"x\"] <- 1 # fixed x effects imputation impM1 <- impM impM1[c(\"y\", \"w\", \"v\")] <- c(\"2l.pan\", \"2lonly.norm\", \"2lonly.pmm\") # y ... imputation using pan # w ... imputation at level 2 using norm # v ... imputation at level 2 using pmm imp1 <- mice(as.matrix(dfr), m = 1, predictorMatrix = predM1, method = impM1, maxit = 1, paniter = 500 ) #> #> iter imp variable #> 1 1 y w v # Demonstration that 2lonly.norm aborts for partial missing data. # Better use 2lonly.mean for repair. data <- data.frame( patid = rep(1:4, each = 5), sex = rep(c(1, 2, 1, 2), each = 5), crp = c( 68, 78, 93, NA, 143, 5, 7, 9, 13, NA, 97, NA, 56, 52, 34, 22, 30, NA, NA, 45 ) ) pred <- make.predictorMatrix(data) pred[, \"patid\"] <- -2 # only missing value (out of five) for patid == 1 data[3, \"sex\"] <- NA if (FALSE) { # \\dontrun{ # The following fails because 2lonly.norm found partially missing # level-2 data # imp <- mice(data, method = c(\"\", \"2lonly.norm\", \"2l.pan\"), # predictorMatrix = pred, maxit = 1, m = 2) # > iter imp variable # > 1 1 sex crpError in .imputation.level2(y = y, ... : # > Method 2lonly.norm found the following clusters with partially missing # > level-2 data: 1 # > Method 2lonly.mean can fix such inconsistencies. } # } # In contrast, if all sex values are missing for patid == 1, it runs fine, # except on r-patched-solaris-x86. I used dontrun to evade CRAN errors. if (FALSE) { # \\dontrun{ data[1:5, \"sex\"] <- NA imp <- mice(data, method = c(\"\", \"2lonly.norm\", \"2l.pan\"), predictorMatrix = pred, maxit = 1, m = 2 ) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"Imputes univariate missing data level 2 using predictive mean matching. Variables level 1 aggregated level 2. group identifier level 2 must indicated type = -2 predictorMatrix.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"","code":"mice.impute.2lonly.pmm(y, ry, x, type, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. type Group identifier must specified '-2'. Predictors must specified '1'. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"vector length nmis imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"function allows combination mice.impute.2l.pan switching regression imputation level 1 level 2 described Yucel (2008) Gelman Hill (2007, p. 541). function checks partial missing level-2 data. Level-2 data assumed constant within cluster. one entries missing, procedure aborts error message identifies cluster incomplete level-2 data. cases, one may first fill cluster mean (mode) 2lonly.mean method remove inconsistencies.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"extension categorical variables transforms dependent factor variable means .integer() function. may make sense categories approximately ordered, less pure nominal measures. general approach, see miceadds::mice.impute.2lonly.function().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"Gelman, . Hill, J. (2007). Data analysis using regression multilevel/hierarchical models. Cambridge, Cambridge University Press. Yucel, RM (2008). Multiple imputation inference multivariate multilevel continuous data ignorable non-response. Philosophical Transactions Royal Society , 366, 2389-2404. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"Alexander Robitzsch (IPN - Leibniz Institute Science Mathematics Education, Kiel, Germany), robitzsch@ipn.uni-kiel.de","code":""},{"path":"https://amices.org/mice/reference/mice.impute.2lonly.pmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation at level 2 by predictive mean matching — mice.impute.2lonly.pmm","text":"","code":"# simulate some data # x,y ... level 1 variables # v,w ... level 2 variables G <- 250 # number of groups n <- 20 # number of persons beta <- .3 # regression coefficient rho <- .30 # residual intraclass correlation rho.miss <- .10 # correlation with missing response missrate <- .50 # missing proportion y1 <- rep(rnorm(G, sd = sqrt(rho)), each = n) + rnorm(G * n, sd = sqrt(1 - rho)) w <- rep(round(rnorm(G), 2), each = n) v <- rep(round(runif(G, 0, 3)), each = n) x <- rnorm(G * n) y <- y1 + beta * x + .2 * w + .1 * v dfr0 <- dfr <- data.frame(\"group\" = rep(1:G, each = n), \"x\" = x, \"y\" = y, \"w\" = w, \"v\" = v) dfr[rho.miss * x + rnorm(G * n, sd = sqrt(1 - rho.miss)) < qnorm(missrate), \"y\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"w\"] <- NA dfr[rep(rnorm(G), each = n) < qnorm(missrate), \"v\"] <- NA # empty mice imputation imp0 <- mice(as.matrix(dfr), maxit = 0) predM <- imp0$predictorMatrix impM <- imp0$method # multilevel imputation predM1 <- predM predM1[c(\"w\", \"y\", \"v\"), \"group\"] <- -2 predM1[\"y\", \"x\"] <- 1 # fixed x effects imputation impM1 <- impM impM1[c(\"y\", \"w\", \"v\")] <- c(\"2l.pan\", \"2lonly.norm\", \"2lonly.pmm\") # turn v into a categorical variable dfr$v <- as.factor(dfr$v) levels(dfr$v) <- LETTERS[1:4] # y ... imputation using pan # w ... imputation at level 2 using norm # v ... imputation at level 2 using pmm # skip imputation on solaris is.solaris <- function() grepl(\"SunOS\", Sys.info()[\"sysname\"]) if (!is.solaris()) { imp <- mice(dfr, m = 1, predictorMatrix = predM1, method = impM1, maxit = 1, paniter = 500 ) } #> #> iter imp variable #> 1 1 y w v"},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by classification and regression trees — mice.impute.cart","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Imputes univariate missing data using classification regression trees.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by classification and regression trees — mice.impute.cart","text":"","code":"mice.impute.cart(y, ry, x, wy = NULL, minbucket = 5, cp = 1e-04, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by classification and regression trees — mice.impute.cart","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. minbucket minimum number observations terminal node used. See rpart.control details. cp Complexity parameter. split decrease overall lack fit factor cp attempted. See rpart.control details. ... named arguments passed rpart().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Vector imputed data, type y, length sum(wy) Numeric vector length sum(!ry) imputations","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Imputation y classification regression trees. procedure follows: Fit classification regression tree recursive partitioning; ymis, find terminal node end according fitted tree; Make random draw among member node, take observed value draw imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Doove, L.L., van Buuren, S., Dusseldorp, E. (2014), Recursive partitioning missing data imputation presence interaction Effects. Computational Statistics & Data Analysis, 72, 92-104. Breiman, L., Friedman, J. H., Olshen, R. ., Stone, C. J. (1984), Classification regression trees, Monterey, CA: Wadsworth & Brooks/Cole Advanced Books & Software. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by classification and regression trees — mice.impute.cart","text":"Lisa Doove, Stef van Buuren, Elise Dusseldorp, 2012","code":""},{"path":"https://amices.org/mice/reference/mice.impute.cart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by classification and regression trees — mice.impute.cart","text":"","code":"imp <- mice(nhanes2, meth = \"cart\", minbucket = 4) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl plot(imp)"},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"function wrapper around jomoImpute function mitml package can called impute blocks variables mice. mitml::jomoImpute function provides interface jomo package multiple imputation multilevel data https://CRAN.R-project.org/package=jomo. Imputations can generated using type formula, offer different options model specification.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"","code":"mice.impute.jomoImpute( data, formula, type, m = 1, silent = TRUE, format = \"imputes\", ... )"},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"data data frame containing incomplete auxiliary variables, cluster indicator variable, variables present imputed datasets. formula formula specifying role variable imputation model. basic model constructed model.matrix, thus allowing include derived variables imputation model using (). See jomoImpute. type integer vector specifying role variable imputation model (see jomoImpute) m number imputed data sets generate. Default 10. silent (optional) Logical flag indicating console output suppressed. Default FALSE. format character vector specifying type object returned. default format = \"list\". formats currently supported. ... named arguments: n.burn, n.iter, group, prior, silent others.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"list imputations incomplete variables model, can stored imp component mids object.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"number imputations m set 1, function called m times fits within mice iteration scheme. multivariate imputation function using joint model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"Grund S, Luedtke O, Robitzsch (2016). Multiple Imputation Multilevel Missing Data: Introduction R Package pan. SAGE Open. Quartagno M Carpenter JR (2015). Multiple imputation IPD meta-analysis: allowing heterogeneity studies missing covariates. Statistics Medicine, 35:2938-2954, 2015.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"Stef van Buuren, 2018, building work Simon Grund, Alexander Robitzsch Oliver Luedtke (authors mitml package) Quartagno Carpenter (authors jomo package).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.jomoImpute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multivariate multilevel imputation using jomo — mice.impute.jomoImpute","text":"","code":"if (FALSE) { # \\dontrun{ # Note: Requires mitml 0.3-5.7 blocks <- list(c(\"bmi\", \"chl\", \"hyp\"), \"age\") method <- c(\"jomoImpute\", \"pmm\") ini <- mice(nhanes, blocks = blocks, method = method, maxit = 0) pred <- ini$pred pred[\"B1\", \"hyp\"] <- -2 imp <- mice(nhanes, blocks = blocks, method = method, pred = pred, maxit = 1) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Imputes univariate missing binary data using lasso logistic regression bootstrap.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"","code":"mice.impute.lasso.logreg(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"method consists following steps: given y variable imputation, draw bootstrap version y* replacement observed cases y[ry], stores x* corresponding values x[ry, ]. Fit regularised (lasso) logistic regression y* outcome, x* predictors. vector regression coefficients bhat obtained. coefficients considered random draws imputation model parameters posterior distribution. coefficients shrunken 0. Compute predicted scores m.d., .e. logit-1(X bhat) Compare score random (0,1) deviate, impute. method based Direct Use Regularized Regression (DURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.logreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by direct use of lasso logistic regression — mice.impute.lasso.logreg","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Imputes univariate missing normal data using lasso linear regression bootstrap.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"","code":"mice.impute.lasso.norm(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"method consists following steps: given y variable imputation, draw bootstrap version y* replacement observed cases y[ry], stores x* corresponding values x[ry, ]. Fit regularised (lasso) linear regression y* outcome, x* predictors. vector regression coefficients bhat obtained. coefficients considered random draws imputation model parameters posterior distribution. coefficients shrunken 0. Draw imputed values predictive distribution defined original (non-bootstrap) data, bhat, estimated error variance. method based Direct Use Regularized Regression (DURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by direct use of lasso linear regression — mice.impute.lasso.norm","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Imputes univariate missing data using logistic regression following preprocessing lasso variable selection step.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"","code":"mice.impute.lasso.select.logreg(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"method consists following steps: given y variable imputation, fit linear regression lasso penalty using y[ry] dependent variable x[ry, ] predictors. coefficients shrunk 0 define active set predictors used imputation. Fit logit active set predictors, find (bhat, V(bhat)) Draw BETA N(bhat, V(bhat)) Compute predicted scores m.d., .e. logit-1(X BETA) Compare score random (0,1) deviate, impute. user can specify predictorMatrix mice call define predictors provided univariate imputation method. lasso regularization select, among variables indicated user, ones important imputation given iteration. Therefore, users may force exclusion predictor given imputation model speficing 0 entry. However, non-zero entry guarantee variable used, decision ultimately made lasso variable selection procedure. method based Indirect Use Regularized Regression (IURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.logreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by indirect use of lasso logistic regression — mice.impute.lasso.select.logreg","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Imputes univariate missing data using Bayesian linear regression following preprocessing lasso variable selection step.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"","code":"mice.impute.lasso.select.norm(y, ry, x, wy = NULL, nfolds = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nfolds number folds cross-validation lasso penalty. default 10. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"method consists following steps: given y variable imputation, fit linear regression lasso penalty using y[ry] dependent variable x[ry, ] predictors. Coefficients shrunk 0 define active set predictors used imputation Define Bayesian linear model using y[ry] dependent variable, active set x[ry, ] predictors, standard non-informative priors Draw parameter values intercept, regression weights, error variance posterior distribution Draw imputations posterior predictive distribution user can specify predictorMatrix mice call define predictors provided univariate imputation method. lasso regularization select, among variables indicated user, ones important imputation given iteration. Therefore, users may force exclusion predictor given imputation model specifying 0 entry. However, non-zero entry guarantee variable used, decision ultimately made lasso variable selection procedure. method based Indirect Use Regularized Regression (IURR) proposed Zhao & Long (2016) Deng et al (2016).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Deng, Y., Chang, C., Ido, M. S., & Long, Q. (2016). Multiple imputation general missing data patterns presence high-dimensional data. Scientific reports, 6(1), 1-10. Zhao, Y., & Long, Q. (2016). Multiple imputation presence high-dimensional data. Statistical Methods Medical Research, 25(5), 2021-2035.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lasso.select.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by indirect use of lasso linear regression — mice.impute.lasso.select.norm","text":"Edoardo Costantini, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear discriminant analysis — mice.impute.lda","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Imputes univariate missing data using linear discriminant analysis","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"","code":"mice.impute.lda(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments. used.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Vector imputed data, type factor, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Imputation categorical response variables linear discriminant analysis. function uses Venables/Ripley functions lda() predict.lda() compute posterior probabilities incomplete case, draws imputations posterior. function can called within Gibbs sampler specifying \"lda\" method argument mice(). method usually faster uses fewer resources calling function, statistical properties may good (Brand, 1999). mice.impute.polyreg.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"function incorporate variability discriminant weight, 'proper' sense Rubin. small samples rare categories y, variability imputed data therefore underestimated. Added: SvB June 2009 Tried include bootstrap, disabled since bootstrapping may easily lead constant variables within groups.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999). Development, Implementation Evaluation Multiple Imputation Strategies Statistical Analysis Incomplete Data Sets. Ph.D. Thesis, TNO Prevention Health/Erasmus University Rotterdam. ISBN 90-74479-08-1. Venables, W.N. & Ripley, B.D. (1997). Modern applied statistics S-PLUS (2nd ed). Springer, Berlin.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.lda.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear discriminant analysis — mice.impute.lda","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Imputes univariate missing data using logistic regression bootstrapped logistic regression model. bootstrap method draws simple bootstrap sample replacement observed data y[ry] x[ry, ].","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"","code":"mice.impute.logreg.boot(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.logreg.boot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by logistic regression using the bootstrap — mice.impute.logreg.boot","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000, 2011","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by logistic regression — mice.impute.logreg","title":"Imputation by logistic regression — mice.impute.logreg","text":"Imputes univariate missing data using logistic regression.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by logistic regression — mice.impute.logreg","text":"","code":"mice.impute.logreg(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by logistic regression — mice.impute.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by logistic regression — mice.impute.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by logistic regression — mice.impute.logreg","text":"Imputation binary response variables Bayesian logistic regression model (Rubin 1987, p. 169-170). Bayesian method consists following steps: Fit logit, find (bhat, V(bhat)) Draw BETA N(bhat, V(bhat)) Compute predicted scores m.d., .e. logit-1(X BETA) Compare score random (0,1) deviate, impute. method relies standard glm.fit function. Warnings glm.fit suppressed. Perfect prediction handled data augmentation method.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by logistic regression — mice.impute.logreg","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999). Development, Implementation Evaluation Multiple Imputation Strategies Statistical Analysis Incomplete Data Sets. Ph.D. Thesis, TNO Prevention Health/Erasmus University Rotterdam. ISBN 90-74479-08-1. Venables, W.N. & Ripley, B.D. (1997). Modern applied statistics S-Plus (2nd ed). Springer, Berlin. White, ., Daniel, R. Royston, P (2010). Avoiding bias due perfect prediction multiple imputation incomplete categorical variables. Computational Statistics Data Analysis, 54:22672275.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.logreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by logistic regression — mice.impute.logreg","text":"Stef van Buuren, Karin Groothuis-Oudshoorn","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by the mean — mice.impute.mean","title":"Imputation by the mean — mice.impute.mean","text":"Imputes arithmetic mean observed data","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by the mean — mice.impute.mean","text":"","code":"mice.impute.mean(y, ry, x = NULL, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by the mean — mice.impute.mean","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by the mean — mice.impute.mean","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by the mean — mice.impute.mean","text":"Imputing mean variable almost never appropriate. See Little Rubin (2002, p. 61-62) Van Buuren (2012, p. 10-11)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mean.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by the mean — mice.impute.mean","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Little, R.J.. Rubin, D.B. (2002). Statistical Analysis Missing Data. New York: John Wiley Sons. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Imputes univariate missing data using predictive mean matching.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"","code":"mice.impute.midastouch( y, ry, x, wy = NULL, ridge = 1e-05, midas.kappa = NULL, outout = TRUE, neff = NULL, debug = NULL, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ridge ridge penalty used .norm.draw() prevent problems multicollinearity. default ridge = 1e-05, means 0.01 percent diagonal added cross-product. Larger ridges may result biased estimates. highly noisy data (e.g. many junk variables), set ridge = 1e-06 even lower reduce bias. highly collinear data, set ridge = 1e-04 higher. midas.kappa Scalar. NULL (default) optimal kappa gets selected automatically. Alternatively, user may specify scalar. Siddique Belin 2008 find midas.kappa = 3 sensible. outout Logical. TRUE (default) one model estimated donor (leave-one-principle). speedup choose outout = FALSE, estimates one model observations leading -sample predictions donors --sample predictions recipients. Mind inappropriateness, though. neff EXPERTS. Null character string. name existing environment effective sample size donors loop (CE iterations times multiple imputations) supposed written. effective sample size necessary compute correction total variance originally suggested Parzen, Lipsitz Fitzmaurice 2005. objectname midastouch.neff. debug EXPERTS. Null character string. name existing environment input supposed written. objectname midastouch.inputlist. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Imputation y predictive mean matching, based Rubin (1987, p. 168, formulas b) Siddique Belin 2008. procedure follows: Draw bootstrap sample donor pool. Estimate beta matrix bootstrap sample leave one principle. Compute type II predicted values yobs (nobs x 1) ymis (nmis x nobs). Calculate distance yobs corresponding ymis. Convert distances drawing probabilities. recipient draw donor entire pool considering probabilities model. Take observed value y imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Gaffert, P., Meinfelder, F., Bosch V. (2015) Towards MI-proper Predictive Mean Matching, Discussion Paper. https://www.uni-bamberg.de/fileadmin/uni/fakultaeten/sowi_lehrstuehle/statistik/Personen/Dateien_Florian/properPMM.pdf Little, R.J.. (1988), Missing data adjustments large surveys (discussion), Journal Business Economics Statistics, 6, 287–301. Parzen, M., Lipsitz, S. R., Fitzmaurice, G. M. (2005), note reducing bias approximate Bayesian bootstrap imputation variance estimator. Biometrika 92, 4, 971–974. Rubin, D.B. (1987), Multiple imputation nonresponse surveys. New York: Wiley. Siddique, J., Belin, T.R. (2008), Multiple imputation using iterative hot-deck distance-based donor selection. Statistics medicine, 27, 1, 83–102 Van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006), Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064. Van Buuren, S., Groothuis-Oudshoorn, K. (2011), mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45, 3, 1–67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"Philipp Gaffert, Florian Meinfelder, Volker Bosch 2015","code":""},{"path":"https://amices.org/mice/reference/mice.impute.midastouch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by predictive mean matching with distance aided donor selection — mice.impute.midastouch","text":"","code":"# do default multiple imputation on a numeric matrix imp <- mice(nhanes, method = \"midastouch\") #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl imp #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"midastouch\" \"midastouch\" \"midastouch\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0 # list the actual imputations for BMI imp$imp$bmi #> 1 2 3 4 5 #> 1 30.1 35.3 22.5 22.5 26.3 #> 3 30.1 30.1 30.1 29.6 22.0 #> 4 21.7 27.2 21.7 20.4 25.5 #> 6 21.7 27.4 25.5 25.5 25.5 #> 10 27.2 22.7 22.7 24.9 27.4 #> 11 30.1 29.6 30.1 22.5 22.0 #> 12 35.3 26.3 25.5 24.9 27.4 #> 16 30.1 29.6 30.1 22.5 22.0 #> 21 30.1 22.5 30.1 22.5 22.0 # first completed data matrix complete(imp) #> age bmi hyp chl #> 1 1 30.1 1 187 #> 2 2 22.7 1 187 #> 3 1 30.1 1 187 #> 4 3 21.7 2 186 #> 5 1 20.4 1 113 #> 6 3 21.7 1 184 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 10 2 27.2 1 186 #> 11 1 30.1 1 187 #> 12 2 35.3 1 229 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 187 #> 16 1 30.1 1 187 #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 206 #> 21 1 30.1 1 187 #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 284 #> 25 2 27.4 1 186 # imputation on mixed data with a different method per column mice(nhanes2, method = c(\"sample\", \"midastouch\", \"logreg\", \"norm\")) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl #> Class: mids #> Number of multiple imputations: 5 #> Imputation methods: #> age bmi hyp chl #> \"\" \"midastouch\" \"logreg\" \"norm\" #> PredictorMatrix: #> age bmi hyp chl #> age 0 1 1 1 #> bmi 1 0 1 1 #> hyp 1 1 0 1 #> chl 1 1 1 0"},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Imputes univariate data user-specified MNAR mechanism linear logistic regression NARFCS. Sensitivity analysis different model specifications may shed light impact different MNAR assumptions conclusions.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"","code":"mice.impute.mnar.logreg(y, ry, x, wy = NULL, ums = NULL, umx = NULL, ...) mice.impute.mnar.norm(y, ry, x, wy = NULL, ums = NULL, umx = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ums string containing specification unidentifiable part imputation model (*unidentifiable model specification\"), , desired \\(\\delta\\)-adjustment (offset) function variables values corresponding deltas (sensitivity parameters). See details. umx auxiliary data matrix containing variables appear identifiable part imputation procedure specified via ums predictors unidentifiable part imputation model. See details. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"function imputes data thought Missing Random (MNAR) NARFCS method. NARFCS procedure (Tompsett et al, 2018) generalises -called \\(\\delta\\)-adjustment sensitivity analysis method Van Buuren, Boshuizen & Knook (1999) case multiple incomplete variables within FCS framework. practical terms, NARFCS procedure shifts imputations drawn iteration mice user-specified quantity can vary across subjects, reflect systematic departures missing data data distribution imputed MAR. Specification NARFCS model done blots argument mice(). blots parameter named list. variable imputed mice.impute.mnar.norm() mice.impute.mnar.logreg() corresponding element blots list least one argument ums , optionally, second argument umx. example, high-level call might like something like mice(nhanes[, c(2, 4)], method = c(\"pmm\", \"mnar.norm\"), blots = list(chl = list(ums = \"-3+2*bmi\"))). ums parameter required, might look like : \"-4+1*Y\". ums specifcation must following characteristics: single term corresponding intercept (constant) term, multiplied variable name, must included expression; term expression (corresponding intercept predictor variable) must separated either \"+\" \"-\" sign, depending sign sensitivity parameter; Within non-intercept term, sensitivity parameter value comes first predictor variable comes second, must separated \"*\" sign; categorical predictors, example variable Z K + 1 categories (\"Cat0\",\"Cat1\", ...,\"CatK\"), K category-specific terms needed, umx (see ) must specified concatenating variable name name category (e.g. ZCat1) named design matrix (argument x) passed univariate imputation function. example \"2+1*ZCat1-3*ZCat2\". given, umx specification must following characteristics: contains complete variables, missing values; numeric matrix. particular, categorical variables must represented dummy indicators names corresponding used ums refer category-specific terms (see ); number rows data argument passed main mice function; contain variables already predictors identifiable part model variable imputation. Limitation: present implementation can condition variables appear identifiable part imputation model (x) complete auxiliary variables passed via umx argument. possible specify models offset depends incomplete auxiliary variables. MNAR alternative see also mice.impute.ri.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Tompsett, D. M., Leacy, F., Moreno-Betancur, M., Heron, J., & White, . R. (2018). use --random fully conditional specification (NARFCS) procedure practice. Statistics Medicine, 37(15), 2338-2353. doi:10.1002/sim.7643 . Van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"Margarita Moreno-Betancur, Stef van Buuren, Ian R. White, 2020.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mnar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation under MNAR mechanism by NARFCS — mice.impute.mnar.logreg","text":"","code":"# 1: Example with no auxiliary data: only pass unidentifiable model specification (ums) # Specify argument to pass on to mnar imputation functions via \"blots\" argument mnar.blot <- list(X = list(ums = \"-4\"), Y = list(ums = \"2+1*ZCat1-3*ZCat2\")) # Run NARFCS by using mnar imputation methods and passing argument via blots impNARFCS <- mice(mnar_demo_data, method = c(\"mnar.logreg\", \"mnar.norm\", \"\"), blots = mnar.blot, seed = 234235, print = FALSE ) # Obtain MI results: Note they coincide with those from old version at # https://github.com/moreno-betancur/NARFCS pool(with(impNARFCS, lm(Y ~ X + Z)))$pooled$estimate #> [1] 19.368813 3.039045 -14.643202 -28.586061 # 2: Example passing also auxiliary data to MNAR procedure (umx) # Assumptions: # - Auxiliary data are complete, no missing values # - Auxiliary data are a numeric matrix # - Auxiliary data have same number of rows as x # - Auxiliary data have no overlapping variable names with x # Specify argument to pass on to mnar imputation functions via \"blots\" argument aux <- matrix(0:1, nrow = nrow(mnar_demo_data)) dimnames(aux) <- list(NULL, \"even\") mnar.blot <- list( X = list(ums = \"-4\"), Y = list(ums = \"2+1*ZCat1-3*ZCat2+0.5*even\", umx = aux) ) # Run NARFCS by using mnar imputation methods and passing argument via blots impNARFCS <- mice(mnar_demo_data, method = c(\"mnar.logreg\", \"mnar.norm\", \"\"), blots = mnar.blot, seed = 234235, print = FALSE ) # Obtain MI results: As expected they differ (slightly) from those # from old version at https://github.com/moreno-betancur/NARFCS pool(with(impNARFCS, lm(Y ~ X + Z)))$pooled$estimate #> [1] 19.521134 2.952546 -14.729454 -28.699292"},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"Imputes multivariate incomplete data among specific relations, instance, polynomials, interactions, range restrictions sum scores.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"","code":"mice.impute.mpmm(data, format = \"imputes\", ...)"},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"data matrix exactly two missing data patterns format character vector specifying type object returned. default format = \"imputes\". ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"matrix imputed data, ncol(y) columns sum(wy) rows.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"function implements predictive mean matching applies canonical regression analysis select donors fora set missing variables. general, canonical regressionanalysis looks linear combination covariates predicts linear combination outcomes (set missing variables) optimally least-square sense (Israels, 1987). predicted value linear combination set missing variables applied perform predictive mean matching.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"function requires variables block missingness pattern. one missingness pattern, function return warning.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"Mingyang Cai Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/mice.impute.mpmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by multivariate predictive mean matching — mice.impute.mpmm","text":"","code":"# simulate data beta2 <- beta1 <- .5 x <- rnorm(1000) e <- rnorm(1000, 0, 1) y <- beta1 * x + beta2 * x^2 + e dat <- data.frame(y = y, x = x, x2 = x^2) m <- as.logical(rbinom(1000, 1, 0.25)) dat[m, c(\"x\", \"x2\")] <- NA # impute blk <- list(\"y\", c(\"x\", \"x2\")) meth <- c(\"\", \"mpmm\") imp <- mice(dat, blocks = blk, method = meth, print = FALSE, m = 2, maxit = 2) # analyse and check summary(pool(with(imp, lm(y ~ x + x2)))) #> term estimate std.error statistic df p.value #> 1 (Intercept) 0.03113943 0.04146686 0.7509473 38.589154 4.572395e-01 #> 2 x 0.50054117 0.03501063 14.2968326 37.065309 1.162119e-16 #> 3 x2 0.48960396 0.03097395 15.8069581 5.635635 6.971423e-06 with(dat, plot(x, x2, col = mdc(1))) with(complete(imp), points(x[m], x2[m], col = mdc(2)))"},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Imputes univariate missing data using linear regression bootstrap","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"","code":"mice.impute.norm.boot(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Draws bootstrap sample x[ry,] y[ry], calculates regression weights imputes normal residuals.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.boot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear regression, bootstrap method — mice.impute.norm.boot","text":"Gerko Vink, Stef van Buuren, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by Bayesian linear regression — mice.impute.norm","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Calculates imputations univariate missing data Bayesian linear regression, also known normal model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"","code":"mice.impute.norm(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Imputation y normal model method defined Rubin (1987, p. 167). procedure follows: Calculate cross-product matrix \\(S=X_{obs}'X_{obs}\\). Calculate \\(V = (S+{diag}(S)\\kappa)^{-1}\\), small ridge parameter \\(\\kappa\\). Calculate regression weights \\(\\hat\\beta = VX_{obs}'y_{obs}.\\) Draw random variable \\(\\dot g \\sim \\chi^2_\\nu\\) \\(\\nu=n_1 - q\\). Calculate \\(\\dot\\sigma^2 = (y_{obs} - X_{obs}\\hat\\beta)'(y_{obs} - X_{obs}\\hat\\beta)/\\dot g.\\) Draw \\(q\\) independent \\(N(0,1)\\) variates vector \\(\\dot z_1\\). Calculate \\(V^{1/2}\\) Cholesky decomposition. Calculate \\(\\dot\\beta = \\hat\\beta + \\dot\\sigma\\dot z_1 V^{1/2}\\). Draw \\(n_0\\) independent \\(N(0,1)\\) variates vector \\(\\dot z_2\\). Calculate \\(n_0\\) values \\(y_{imp} = X_{mis}\\dot\\beta + \\dot z_2\\dot\\sigma\\). Using mice.impute.norm columns emulates Schafer's NORM method (Schafer, 1997).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Rubin, D.B (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley & Sons. Schafer, J.L. (1997). Analysis incomplete multivariate data. London: Chapman & Hall.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by Bayesian linear regression — mice.impute.norm","text":"Stef van Buuren, Karin Groothuis-Oudshoorn","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Imputes univariate missing data using linear regression analysis without accounting uncertainty model parameters.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"","code":"mice.impute.norm.nob(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"function creates imputations using spread around fitted linear regression line y given x, fitted observed data. function provided mainly allow comparison proper (e.g., implemented mice.impute.norm improper (function) normal imputation methods. large data, many rows, differences proper improper methods small, cases one may opt speed using mice.impute.norm.nob.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"function incorporate variability regression weights, 'proper' sense Rubin. small samples, variability imputed data therefore underestimated.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999). Development, Implementation Evaluation Multiple Imputation Strategies Statistical Analysis Incomplete Data Sets. Ph.D. Thesis, TNO Prevention Health/Erasmus University Rotterdam.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.nob.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear regression without parameter uncertainty — mice.impute.norm.nob","text":"Gerko Vink, Stef van Buuren, Karin Groothuis-Oudshoorn, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by linear regression through prediction — mice.impute.norm.predict","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Imputes \"best value\" according linear regression model, also known regression imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"","code":"mice.impute.norm.predict(y, ry, x, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Calculates regression weights observed data returns predicted values imputations. method known regression imputation.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"METHOD USED DATA ANALYSIS. method seductive imputes likely value according model. However, ignores uncertainty missing values artificially amplifies relations columns data. Application richer models parameters help evade issues. Stochastic regression methods, like mice.impute.pmm mice.impute.norm, generally preferred. best, prediction can give reasonable estimates mean, especially normality assumptions plausible. See Little Rubin (2002, p. 62-64) Van Buuren (2012, p. 11-13, p. 45-46) discussion method.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Little, R.J.. Rubin, D.B. (2002). Statistical Analysis Missing Data. New York: John Wiley Sons. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.norm.predict.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by linear regression through prediction — mice.impute.norm.predict","text":"Gerko Vink, Stef van Buuren, 2018","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute multilevel missing data using pan — mice.impute.panImpute","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"function wrapper around panImpute function mitml package can called impute blocks variables mice. mitml::panImpute function provides interface pan package multiple imputation multilevel data (Schafer & Yucel, 2002). Imputations can generated using type formula, offer different options model specification.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"","code":"mice.impute.panImpute( data, formula, type, m = 1, silent = TRUE, format = \"imputes\", ... )"},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"data data frame containing incomplete auxiliary variables, cluster indicator variable, variables present imputed datasets. formula formula specifying role variable imputation model. basic model constructed model.matrix, thus allowing include derived variables imputation model using (). See panImpute. type integer vector specifying role variable imputation model (see panImpute) m number imputed data sets generate. silent (optional) Logical flag indicating console output suppressed. Default FALSE. format character vector specifying type object returned. default format = \"list\". formats currently supported. ... named arguments: n.burn, n.iter, group, prior, silent others.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"list imputations incomplete variables model, can stored imp component mids object.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"number imputations m set 1, function called m times fits within mice iteration scheme. multivariate imputation function using joint model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"Grund S, Luedtke O, Robitzsch (2016). Multiple Imputation Multilevel Missing Data: Introduction R Package pan. SAGE Open. Schafer JL (1997). Analysis Incomplete Multivariate Data. London: Chapman & Hall. Schafer JL, Yucel RM (2002). Computational strategies multivariate linear mixed-effects models missing values. Journal Computational Graphical Statistics, 11, 437-457.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"Stef van Buuren, 2018, building work Simon Grund, Alexander Robitzsch Oliver Luedtke (authors mitml package) Joe Schafer (author pan package).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.panImpute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Impute multilevel missing data using pan — mice.impute.panImpute","text":"","code":"blocks <- list(c(\"bmi\", \"chl\", \"hyp\"), \"age\") method <- c(\"panImpute\", \"pmm\") ini <- mice(nhanes, blocks = blocks, method = method, maxit = 0) pred <- ini$pred pred[\"B1\", \"hyp\"] <- -2 imp <- mice(nhanes, blocks = blocks, method = method, pred = pred, maxit = 1) #> #> iter imp variable #> 1 1 bmi chl hyp #> 1 2 bmi chl hyp #> 1 3 bmi chl hyp #> 1 4 bmi chl hyp #> 1 5 bmi chl hyp"},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":null,"dir":"Reference","previous_headings":"","what":"Passive imputation — mice.impute.passive","title":"Passive imputation — mice.impute.passive","text":"Calculate new variable imputation","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Passive imputation — mice.impute.passive","text":"","code":"mice.impute.passive(data, func)"},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Passive imputation — mice.impute.passive","text":"data data frame func formula specifying transformations data","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Passive imputation — mice.impute.passive","text":"result applying formula","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Passive imputation — mice.impute.passive","text":"Passive imputation special internal imputation function. Using facility, user can specify, point mice Gibbs sampling algorithm, function imputed data. useful, example, compute cubic version variable, transformation like Q = W/H^2 based two variables, mean variable like (x_1+x_2+x_3)/3. derived variables might used places imputation model. function allows dynamically derive virtually function imputed data virtually time.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Passive imputation — mice.impute.passive","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.passive.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Passive imputation — mice.impute.passive","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by predictive mean matching — mice.impute.pmm","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Imputation predictive mean matching","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"","code":"mice.impute.pmm( y, ry, x, wy = NULL, donors = 5L, matchtype = 1L, exclude = NULL, quantify = TRUE, trim = 1L, ridge = 1e-05, use.matcher = FALSE, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. donors size donor pool among draw made. default donors = 5L. Setting donors = 1L always selects closest match, recommended. Values 3L 10L provide best results cases (Morris et al, 2015). matchtype Type matching distance. default choice (matchtype = 1L) calculates distance predicted value yobs drawn values ymis (called type-1 matching). choices matchtype = 0L (distance predicted values) matchtype = 2L (distance drawn values). exclude Dependent values exclude imputation model collection donor values quantify Logical. TRUE, factor levels replaced first canonical variate fitting imputation model. false, procedure reverts old behaviour takes integer codes (may lack sensible interpretation). Relevant y factor. trim Scalar integer. Minimum number observations required category order considered potential donor value. Relevant y factor. ridge ridge penalty used .norm.draw() prevent problems multicollinearity. default ridge = 1e-05, means 0.01 percent diagonal added cross-product. Larger ridges may result biased estimates. highly noisy data (e.g. many junk variables), set ridge = 1e-06 even lower reduce bias. highly collinear data, set ridge = 1e-04 higher. use.matcher Logical. Set use.matcher = TRUE specify C function matcher(), now deprecated matching function default versions 2.22 (June 2014) 3.11.7 (Oct 2020). Since version 3.12.0 mice() uses much faster matchindex C function. Use deprecated matcher function exact reproduction. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Imputation y predictive mean matching, based van Buuren (2012, p. 73). procedure follows: Calculate cross-product matrix \\(S=X_{obs}'X_{obs}\\). Calculate \\(V = (S+{diag}(S)\\kappa)^{-1}\\), small ridge parameter \\(\\kappa\\). Calculate regression weights \\(\\hat\\beta = VX_{obs}'y_{obs}.\\) Draw \\(q\\) independent \\(N(0,1)\\) variates vector \\(\\dot z_1\\). Calculate \\(V^{1/2}\\) Cholesky decomposition. Calculate \\(\\dot\\beta = \\hat\\beta + \\dot\\sigma\\dot z_1 V^{1/2}\\). Calculate \\(\\dot\\eta(,j)=|X_{{obs},[]|}\\hat\\beta-X_{{mis},[j]}\\dot\\beta\\) \\(=1,\\dots,n_1\\) \\(j=1,\\dots,n_0\\). Construct \\(n_0\\) sets \\(Z_j\\), containing \\(d\\) candidate donors, \\(y_{obs}\\) \\(\\sum_d\\dot\\eta(,j)\\) minimum \\(j=1,\\dots,n_0\\). Break ties randomly. Draw one donor \\(i_j\\) \\(Z_j\\) randomly \\(j=1,\\dots,n_0\\). Calculate imputations \\(\\dot y_j = y_{i_j}\\) \\(j=1,\\dots,n_0\\). name predictive mean matching proposed Little (1988).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Little, R.J.. (1988), Missing data adjustments large surveys (discussion), Journal Business Economics Statistics, 6, 287–301. Morris TP, White IR, Royston P (2015). Tuning multiple imputation predictive mean matching local residual draws. BMC Med Res Methodol. ;14:75. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL. Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"Gerko Vink, Stef van Buuren, Karin Groothuis-Oudshoorn","code":""},{"path":"https://amices.org/mice/reference/mice.impute.pmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by predictive mean matching — mice.impute.pmm","text":"","code":"# We normally call mice.impute.pmm() from within mice() # But we may call it directly as follows (not recommended) set.seed(53177) xname <- c(\"age\", \"hgt\", \"wgt\") r <- stats::complete.cases(boys[, xname]) x <- boys[r, xname] y <- boys[r, \"tv\"] ry <- !is.na(y) table(ry) #> ry #> FALSE TRUE #> 503 224 # percentage of missing data in tv sum(!ry) / length(ry) #> [1] 0.6918845 # Impute missing tv data yimp <- mice.impute.pmm(y, ry, x) length(yimp) #> [1] 503 hist(yimp, xlab = \"Imputed missing tv\") # Impute all tv data yimp <- mice.impute.pmm(y, ry, x, wy = rep(TRUE, length(y))) length(yimp) #> [1] 727 hist(yimp, xlab = \"Imputed missing and observed tv\") plot(jitter(y), jitter(yimp), main = \"Predictive mean matching on age, height and weight\", xlab = \"Observed tv (n = 224)\", ylab = \"Imputed tv (n = 224)\" ) abline(0, 1) cor(y, yimp, use = \"pair\") #> [1] 0.7415001 # Use blots to exclude different values per column # Create blots object blots <- make.blots(boys) # Exclude ml 1 through 5 from tv donor pool blots$tv$exclude <- c(1:5) # Exclude 100 random observed heights from tv donor pool blots$hgt$exclude <- sample(unique(boys$hgt), 100) imp <- mice(boys, method = \"pmm\", print = FALSE, blots = blots, seed=123) blots$hgt$exclude %in% unlist(c(imp$imp$hgt)) # MUST be all FALSE #> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [61] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [97] FALSE FALSE FALSE FALSE blots$tv$exclude %in% unlist(c(imp$imp$tv)) # MUST be all FALSE #> [1] FALSE FALSE FALSE FALSE FALSE # Factor quantification xname <- c(\"age\", \"hgt\", \"wgt\") br <- boys[c(1:10, 101:110, 501:510, 601:620, 701:710), ] r <- stats::complete.cases(br[, xname]) x <- br[r, xname] y <- factor(br[r, \"tv\"]) ry <- !is.na(y) table(y) #> y #> 6 8 10 12 13 15 16 20 25 #> 1 2 1 1 1 4 1 4 7 # impute factor by optimizing canonical correlation y, x mice.impute.pmm(y, ry, x) #> [1] 25 25 25 20 25 25 20 25 25 25 15 25 25 25 25 25 15 15 25 15 20 15 8 25 8 #> [26] 25 20 20 15 25 25 15 15 25 25 15 20 8 #> Levels: 6 8 10 12 13 15 16 20 25 # only categories with at least 2 cases can be donor mice.impute.pmm(y, ry, x, trim = 2L) #> [1] 8 25 25 8 8 20 15 20 20 8 8 8 15 8 20 20 15 8 20 25 20 25 20 15 20 #> [26] 20 20 20 15 20 15 25 20 25 25 20 20 20 #> Levels: 6 8 10 12 13 15 16 20 25 # in addition, eliminate category 20 mice.impute.pmm(y, ry, x, trim = 2L, exclude = 20) #> [1] 8 25 15 25 15 8 8 25 25 25 8 15 15 8 8 8 25 25 25 25 15 8 8 15 15 #> [26] 25 15 8 15 15 25 25 15 25 25 15 25 25 #> Levels: 6 8 10 12 13 15 16 20 25 # to get old behavior: as.integer(y)) mice.impute.pmm(y, ry, x, quantify = FALSE) #> [1] 8 6 10 15 12 8 6 15 15 10 10 6 8 10 8 15 8 15 8 15 15 12 15 8 20 #> [26] 25 12 25 15 25 25 13 8 20 16 20 20 20 #> Levels: 6 8 10 12 13 15 16 20 25"},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of ordered data by polytomous regression — mice.impute.polr","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Imputes missing data categorical variable using polytomous regression","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"","code":"mice.impute.polr( y, ry, x, wy = NULL, nnet.maxit = 100, nnet.trace = FALSE, nnet.MaxNWts = 1500, polr.to.loggedEvents = FALSE, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nnet.maxit Tuning parameter nnet(). nnet.trace Tuning parameter nnet(). nnet.MaxNWts Tuning parameter nnet(). polr..loggedEvents logical indicating whether fallback multinom() function written loggedEvents. default FALSE. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"function mice.impute.polr() imputes ordered categorical response variables proportional odds logistic regression (polr) model. function repeatedly applies logistic regression successive splits. model also known cumulative link model. default, ordered factors two levels imputed mice.impute.polr. algorithm mice.impute.polr uses function polr() MASS package. order avoid bias due perfect prediction, algorithm augment data according method White, Daniel Royston (2010). call polr might fail, usually data sparse. case, multinom tried fallback. local flag polr..loggedEvents set TRUE, record written loggedEvents component mids object. Use mice(data, polr..loggedEvents = TRUE) set flag.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"December 2019 Simon White alerted polr always fail silently. can confirm behaviour versions mice 3.0.0 - mice 3.6.6, method requests polr versions fact handled multinom. See https://github.com/amices/mice/issues/206 details.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University. White, .R., Daniel, R. Royston, P. (2010). Avoiding bias due perfect prediction multiple imputation incomplete categorical variables. Computational Statistics Data Analysis, 54, 2267-2275. Venables, W.N. & Ripley, B.D. (2002). Modern applied statistics S-Plus (4th ed). Springer, Berlin.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.polr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of ordered data by polytomous regression — mice.impute.polr","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000-2010","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Imputes missing data categorical variable using polytomous regression","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"","code":"mice.impute.polyreg( y, ry, x, wy = NULL, nnet.maxit = 100, nnet.trace = FALSE, nnet.MaxNWts = 1500, ... )"},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. nnet.maxit Tuning parameter nnet(). nnet.trace Tuning parameter nnet(). nnet.MaxNWts Tuning parameter nnet(). ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"function mice.impute.polyreg() imputes categorical response variables Bayesian polytomous regression model. See J.P.L. Brand (1999), Chapter 4, Appendix B. default, unordered factors two levels imputed mice.impute.polyreg(). method consists following steps: Fit categorical response multinomial model Compute predicted categories Add appropriate noise predictions algorithm mice.impute.polyreg uses function multinom() nnet package. order avoid bias due perfect prediction, algorithm augment data according method White, Daniel Royston (2010).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03 Brand, J.P.L. (1999) Development, implementation evaluation multiple imputation strategies statistical analysis incomplete data sets. Dissertation. Rotterdam: Erasmus University. White, .R., Daniel, R. Royston, P. (2010). Avoiding bias due perfect prediction multiple imputation incomplete categorical variables. Computational Statistics Data Analysis, 54, 2267-2275. Venables, W.N. & Ripley, B.D. (2002). Modern applied statistics S-Plus (4th ed). Springer, Berlin.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.polyreg.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of unordered data by polytomous regression — mice.impute.polyreg","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000-2010","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation of quadratic terms — mice.impute.quadratic","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"Imputes incomplete variable appears main effect quadratic effect complete-data model.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"","code":"mice.impute.quadratic(y, ry, x, wy = NULL, quad.outcome = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. quad.outcome name outcome quadratic analysis character string. example, substantive model interest y ~ x + xx, \"y\" quad.outcome ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"function implements \"polynomial combination\" method. First, polynomial combination \\(Z = Y \\beta_1 + Y^2 \\beta_2\\) formed. \\(Z\\) imputed predictive mean matching, followed decomposition imputed data \\(Z\\) components \\(Y\\) \\(Y^2\\). See Van Buuren (2012, pp. 139-141) Vink et al (2012) details. method ensures 1) imputed data \\(Y\\) \\(Y^2\\) mutually consistent, 2) provides unbiased estimates regression weights complete-data linear regression use \\(Y\\) \\(Y^2\\).","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"two situations consider. linear term Y present data, calculate quadratic term YY imputation. linear term Y quadratic term YY variables data, first impute Y calling mice.impute.quadratic() Y, impute YY passive imputation meth[\"YY\"] <- \"~(Y^2)\". See example section details. Generally, like YY present data need preserve quadratic relations YY third variables multivariate incomplete data might wish impute.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"Mingyang Cai Gerko Vink","code":""},{"path":"https://amices.org/mice/reference/mice.impute.quadratic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation of quadratic terms — mice.impute.quadratic","text":"","code":"# Create Data B1 <- .5 B2 <- .5 X <- rnorm(1000) XX <- X^2 e <- rnorm(1000, 0, 1) Y <- B1 * X + B2 * XX + e dat <- data.frame(x = X, xx = XX, y = Y) # Impose 25 percent MCAR Missingness dat[0 == rbinom(1000, 1, 1 - .25), 1:2] <- NA # Prepare data for imputation ini <- mice(dat, maxit = 0) meth <- c(\"quadratic\", \"~I(x^2)\", \"\") pred <- ini$pred pred[, \"xx\"] <- 0 # Impute data imp <- mice(dat, meth = meth, pred = pred, quad.outcome = \"y\") #> #> iter imp variable #> 1 1 x xx #> 1 2 x xx #> 1 3 x xx #> 1 4 x xx #> 1 5 x xx #> 2 1 x xx #> 2 2 x xx #> 2 3 x xx #> 2 4 x xx #> 2 5 x xx #> 3 1 x xx #> 3 2 x xx #> 3 3 x xx #> 3 4 x xx #> 3 5 x xx #> 4 1 x xx #> 4 2 x xx #> 4 3 x xx #> 4 4 x xx #> 4 5 x xx #> 5 1 x xx #> 5 2 x xx #> 5 3 x xx #> 5 4 x xx #> 5 5 x xx # Pool results pool(with(imp, lm(y ~ x + xx))) #> Class: mipo m = 5 #> term m estimate ubar b t dfcom #> 1 (Intercept) 5 0.09523804 0.0014726259 0.0001460981 0.0016479437 997 #> 2 x 5 0.47686983 0.0009562814 0.0003835250 0.0014165114 997 #> 3 xx 5 0.49101019 0.0004636236 0.0001422658 0.0006343426 997 #> df riv lambda fmi #> 1 252.89879 0.1190511 0.1063858 0.1133699 #> 2 35.86887 0.4812705 0.3249038 0.3596410 #> 3 51.32816 0.3682275 0.2691274 0.2960333 # Plot results stripplot(imp) plot(dat$x, dat$xx, col = mdc(1), xlab = \"x\", ylab = \"xx\") cmp <- complete(imp) points(cmp$x[is.na(dat$x)], cmp$xx[is.na(dat$x)], col = mdc(2))"},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by random forests — mice.impute.rf","title":"Imputation by random forests — mice.impute.rf","text":"Imputes univariate missing data using random forests.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by random forests — mice.impute.rf","text":"","code":"mice.impute.rf( y, ry, x, wy = NULL, ntree = 10, rfPackage = c(\"ranger\", \"randomForest\", \"literanger\"), ... )"},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by random forests — mice.impute.rf","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ntree number trees grow. default 10. rfPackage single string specifying backend estimating random forest. default backend ranger package. alternative literanger predicts faster support forest types split rules ranger. Also implemented alternative randomForest package, used default mice 3.13.10 earlier. ... named arguments passed mice:::install..demand(), randomForest::randomForest(), randomForest:::randomForest.default(), ranger::ranger(), literanger::train().","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by random forests — mice.impute.rf","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by random forests — mice.impute.rf","text":"Imputation y random forests. method calls randomForrest() implements Breiman's random forest algorithm (based Breiman Cutler's original Fortran code) classification regression. See Appendix .1 Doove et al. (2014) definition algorithm used.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Imputation by random forests — mice.impute.rf","text":"alternative implementation independently developed Shah et al (2014). available functions CALIBERrfimpute::mice.impute.rfcat CALIBERrfimpute::mice.impute.rfcont (now archived). Simulations Shah (Feb 13, 2014) suggested quality imputation 10 100 trees identical, mice 2.22 changed default number trees ntree = 100 ntree = 10.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by random forests — mice.impute.rf","text":"Doove, L.L., van Buuren, S., Dusseldorp, E. (2014), Recursive partitioning missing data imputation presence interaction Effects. Computational Statistics & Data Analysis, 72, 92-104. Shah, .D., Bartlett, J.W., Carpenter, J., Nicholas, O., Hemingway, H. (2014), Comparison random forest parametric imputation models imputing missing data using MICE: CALIBER study. American Journal Epidemiology, doi:10.1093/aje/kwt312 . Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by random forests — mice.impute.rf","text":"Lisa Doove, Stef van Buuren, Elise Dusseldorp, 2012; Patrick Rockenschaub, 2021","code":""},{"path":"https://amices.org/mice/reference/mice.impute.rf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputation by random forests — mice.impute.rf","text":"","code":"if (FALSE) { # \\dontrun{ imp <- mice(nhanes2, meth = \"rf\", ntree = 3) plot(imp) } # }"},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Imputes nonignorable missing data random indicator method.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"","code":"mice.impute.ri(y, ry, x, wy = NULL, ri.maxit = 10, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ri.maxit Number inner iterations ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"random indicator method estimates offset distribution observed missing data using algorithm iterates response imputation models. routine assumes response model imputation model predictors. MNAR alternative see also mice.impute.mnar.logreg.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Jolani, S. (2012). Dual Imputation Strategies Analyzing Incomplete Data. Dissertation. University Utrecht, Dec 7 2012.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.impute.ri.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by the random indicator method for nonignorable data — mice.impute.ri","text":"Shahab Jolani (University Utrecht)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputation by simple random sampling — mice.impute.sample","title":"Imputation by simple random sampling — mice.impute.sample","text":"Imputes random sample observed y data","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputation by simple random sampling — mice.impute.sample","text":"","code":"mice.impute.sample(y, ry, x = NULL, wy = NULL, ...)"},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputation by simple random sampling — mice.impute.sample","text":"y Vector imputed ry Logical vector length length(y) indicating subset y[ry] elements y imputation model fitted. ry generally distinguishes observed (TRUE) missing values (FALSE) y. x Numeric design matrix length(y) rows predictors y. Matrix x may missing values. wy Logical vector length length(y). TRUE value indicates locations y imputations created. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputation by simple random sampling — mice.impute.sample","text":"Vector imputed data, type y, length sum(wy)","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Imputation by simple random sampling — mice.impute.sample","text":"function takes simple random sample observed values y, returns imputations.","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Imputation by simple random sampling — mice.impute.sample","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":"https://amices.org/mice/reference/mice.impute.sample.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Imputation by simple random sampling — mice.impute.sample","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000, 2017","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"Takes mids object, produces new object class mids.","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"","code":"mice.mids(obj, newdata = NULL, maxit = 1, printFlag = TRUE, ...)"},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"obj object class mids, typically produces previous call mice() mice.mids() newdata optional data.frame multiple imputations generated according model obj. maxit number additional Gibbs sampling iterations. printFlag Boolean flag. TRUE, diagnostic information Gibbs sampling iterations written command window. default TRUE. ... Named arguments passed univariate imputation functions.","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"function enables user split computations Gibbs sampler smaller parts. useful following reasons: RAM memory may become easily exhausted number iterations large. Returning prompt/session level may alleviate problems. user can compute customized convergence statistics specific points, e.g. iteration, monitoring convergence. - computing 'extra iterations'. Note: imputation model specified mice() function changed mice.mids. state random generator saved mids object.","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mice.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multivariate Imputation by Chained Equations (Iteration Step) — mice.mids","text":"","code":"imp1 <- mice(nhanes, maxit = 1, seed = 123) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl imp2 <- mice.mids(imp1) #> #> iter imp variable #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl # yields the same result as imp <- mice(nhanes, maxit = 2, seed = 123) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl # verification identical(imp$imp, imp2$imp) #> [1] TRUE #"},{"path":"https://amices.org/mice/reference/mice.theme.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the theme for the plotting Trellis functions — mice.theme","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"mice.theme() function sets default choices Trellis plots built mice.","code":""},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"","code":"mice.theme(transparent = TRUE, alpha.fill = 0.3)"},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"transparent logical indicating whether alpha-transparency allowed. default TRUE. alpha.fill numerical values 0 1 indicates default alpha value fills.","code":""},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"mice.theme() returns named list can used theme functions lattice. default, mice.theme() function sets transparent <- TRUE current device .Device supports semi-transparent colors.","code":""},{"path":"https://amices.org/mice/reference/mice.theme.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set the theme for the plotting Trellis functions — mice.theme","text":"Stef van Buuren 2011","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiply imputed data set (mids) — mids-class","title":"Multiply imputed data set (mids) — mids-class","text":"mids object contains multiply imputed data set. mids object generated functions mice(), mice.mids(), cbind.mids(), rbind.mids() ibind.mids().","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiply imputed data set (mids) — mids-class","text":"mids class objects methods following generic functions: print, summary, plot. loggedEvents entry matrix five columns containing record automatic removal actions. NULL action made. initialization program following three actions: 1 variable contains missing values, imputed used predictor removed 2 constant variable removed 3 collinear variable removed. iteration, program following actions: 1 One variables linearly dependent removed (categorical data, 'variable' corresponds dummy variable) 2 Proportional odds regression imputation converge replaced polyreg. Explanation elements loggedEvents: iteration number record added, im imputation number, dep name dependent variable, meth imputation method used, (possibly long) character vector names altered removed predictors.","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multiply imputed data set (mids) — mids-class","text":"mice package use S4 class definitions, instead relies S3 list equivalent oldClass(obj) <- \"mids\".","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Multiply imputed data set (mids) — mids-class","text":".Data: Object class \"list\" containing following slots: data: Original (incomplete) data set. imp: list ncol(data) components generated multiple imputations. list component data.frame (nmis[j] m) imputed values variable j. NULL component used variables imputations generated. m: Number imputations. : argument mice() function. blocks: blocks argument mice() function. call: Call created object. nmis: array containing number missing observations per column. method: vector strings length(blocks specifying imputation method per block. predictorMatrix: numerical matrix containing integers specifying predictor set. visitSequence: vector variable block names specifies variables blocks visited one iteration throuh data. formulas: named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. post: vector strings length length(blocks) commands post-processing. blots: \"Block dots\". blots argument mice() function. ignore: logical vector length nrow(data) indicating rows data used build imputation model. (new mice 3.12.0) seed: seed value solution. iteration: Last Gibbs sampling iteration number. lastSeedValue: recent seed value. chainMean: array dimensions ncol maxit m elements containing mean generated multiple imputations. array can used monitoring convergence. Note observed data present mean. chainVar: array similar structure chainMean, containing variance imputed values. loggedEvents: data.frame five columns containing warnings, corrective actions, inside info. version: Version number mice package created object. date: Date object created.","code":""},{"path":"https://amices.org/mice/reference/mids-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiply imputed data set (mids) — mids-class","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mids-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiply imputed data set (mids) — mids-class","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":null,"dir":"Reference","previous_headings":"","what":"Export mids object to Mplus — mids2mplus","title":"Export mids object to Mplus — mids2mplus","text":"Converts mids object format recognized Mplus, writes data Mplus input files","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export mids object to Mplus — mids2mplus","text":"","code":"mids2mplus( imp, file.prefix = \"imp\", path = getwd(), sep = \"\\t\", dec = \".\", silent = FALSE )"},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export mids object to Mplus — mids2mplus","text":"imp imp argument object class mids, typically produced mice() function. file.prefix character string describing prefix output data files. path character string containing path output file. default, files written current R working directory. sep separator data fields. dec decimal separator numerical data. silent logical flag stating whether names files printed.","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export mids object to Mplus — mids2mplus","text":"return value NULL.","code":""},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Export mids object to Mplus — mids2mplus","text":"function automates work needed export mids object Mplus. function writes multiple imputation datasets, file contains names multiple imputation data sets Mplus input file. Mplus input file proper file names, principle run read data without alteration. Mplus recognize data set multiply imputed data set, automatic pooling procedures supported.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mids2mplus.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Export mids object to Mplus — mids2mplus","text":"Gerko Vink, 2011.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":null,"dir":"Reference","previous_headings":"","what":"Export mids object to SPSS — mids2spss","title":"Export mids object to SPSS — mids2spss","text":"Converts mids object format recognized SPSS, writes data SPSS syntax files.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export mids object to SPSS — mids2spss","text":"","code":"mids2spss( imp, filename = \"midsdata\", path = getwd(), compress = FALSE, silent = FALSE )"},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export mids object to SPSS — mids2spss","text":"imp imp argument object class mids, typically produced mice() function. filename character string describing name output data file extension. path character string containing path output file. value path appended filedat. default, files written current R working directory. path=NULL file path appending done. compress logical flag stating whether resulting SPSS set compressed .zsav file. silent logical flag stating whether location saved file printed.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export mids object to SPSS — mids2spss","text":"return value NULL.","code":""},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Export mids object to SPSS — mids2spss","text":"function automates work needed export mids object SPSS. uses haven::write_sav() facilitate export SPSS .sav .zsav file. things pay attention . SPSS syntax file proper file names separators set, principle run read data without alteration. SPSS strict R respect paths. Always use full path, otherwise SPSS may able find data file. Factors R translate categorical variables SPSS. internal coding factor levels used R exported. generally acceptable SPSS. However, data combined existing SPSS data, watch changes factor levels codes. SPSS recognize data set multiply imputed data set, automatic pooling procedures supported. Note however pooling extra option available license MISSING VALUES module. Without license, SPSS still recognize structure data, pool multiply imputed estimates single inference.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mids2spss.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Export mids object to SPSS — mids2spss","text":"Gerko Vink, dec 2020.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"mipo: Multiple imputation pooled object — mipo","title":"mipo: Multiple imputation pooled object — mipo","text":"mipo object contains results pooling step. function pool generates object class mipo.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"mipo: Multiple imputation pooled object — mipo","text":"","code":"mipo(mira.obj, ...) # S3 method for class 'mipo' summary( object, type = c(\"tests\", \"all\"), conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ... ) # S3 method for class 'mipo' print(x, ...) # S3 method for class 'mipo.summary' print(x, ...) process_mipo(z, x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE)"},{"path":"https://amices.org/mice/reference/mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"mipo: Multiple imputation pooled object — mipo","text":"mira.obj object class mira ... Arguments passed object object class mipo conf.int Logical indicating whether include confidence interval. conf.level Confidence level interval, used conf.int = TRUE. Number 0 1. exponentiate Flag indicating whether exponentiate coefficient estimates confidence intervals (typical logistic regression). x object class mipo z Data frame tidied version coefficient matrix","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"mipo: Multiple imputation pooled object — mipo","text":"summary method returns data frame summary statistics pooled analysis.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"mipo: Multiple imputation pooled object — mipo","text":"object class mipo list elements: call, m, pooled glanced. pooled elements data frame columns: names terms stored row.names(pooled). glanced elements data.frame m rows. precise composition depends class complete-data analysis. least field nobs expected present. process_mipo helper function process tidied mipo object, normally called directly. adds confidence interval, optionally exponentiates, result.","code":""},{"path":"https://amices.org/mice/reference/mipo.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"mipo: Multiple imputation pooled object — mipo","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mira-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiply imputed repeated analyses (mira) — mira-class","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"mira object generated .mids() function. .mira() function takes results repeated complete-data analysis stored list, turns mira object can pooled.","code":""},{"path":"https://amices.org/mice/reference/mira-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"versions prior mice 3.0 pooling required coef() vcov() methods available fitted objects. feature longer supported. reason vcov() methods inconsistent across packages, leading buggy behaviour pool() function. Since mice 3.0+, broom package takes care filtering relevant parts complete-data analysis. may happen see messages like method tidying S3 object class ... Error: glance method objects class .... royal way solve problem write glance() tidy() methods add broom according specifications given https://broom.tidymodels.org. mira class objects methods following generic functions: print, summary. Many functions mice package use S4 class definitions, instead rely S3 list equivalent oldClass(obj) <- \"mira\".","code":""},{"path":"https://amices.org/mice/reference/mira-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Multiply imputed repeated analyses (mira) — mira-class","text":".Data: Object class \"list\" containing following slots: call: call created object. call1: call created mids object used call. nmis: array containing number missing observations per column. analyses: list m components containing individual fit objects m complete data analyses.","code":""},{"path":"https://amices.org/mice/reference/mira-class.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/mira-class.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiply imputed repeated analyses (mira) — mira-class","text":"Stef van Buuren, Karin Groothuis-Oudshoorn, 2000","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":null,"dir":"Reference","previous_headings":"","what":"MNAR demo data — mnar_demo_data","title":"MNAR demo data — mnar_demo_data","text":"toy example Margarita Moreno-Betancur checking NARFCS.","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"MNAR demo data — mnar_demo_data","text":"","code":"mnar_demo_data"},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"MNAR demo data — mnar_demo_data","text":"object class data.frame 500 rows 3 columns.","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"MNAR demo data — mnar_demo_data","text":"https://github.com/moreno-betancur/NARFCS/blob/master/datmis.csv","code":""},{"path":"https://amices.org/mice/reference/mnar_demo_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"MNAR demo data — mnar_demo_data","text":"small dataset just three columns.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":null,"dir":"Reference","previous_headings":"","what":"Name imputation blocks — name.blocks","title":"Name imputation blocks — name.blocks","text":"helper function names unnamed elements blocks specification. convenience function.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Name imputation blocks — name.blocks","text":"","code":"name.blocks(blocks, prefix = \"B\")"},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Name imputation blocks — name.blocks","text":"blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited. prefix character vector length 1 prefix using naming unnamed blocks two variables.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Name imputation blocks — name.blocks","text":"named list character vectors variables names.","code":""},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Name imputation blocks — name.blocks","text":"function name unnamed list elements specified optional argument blocks. Unnamed blocks consisting just one variable named variable. Unnamed blocks containing one variables named prefix argument, padded integer sequence stating 1.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/name.blocks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Name imputation blocks — name.blocks","text":"","code":"blocks <- list(c(\"hyp\", \"chl\"), AGE = \"age\", c(\"bmi\", \"hyp\"), \"edu\") name.blocks(blocks) #> $B1 #> [1] \"hyp\" \"chl\" #> #> $AGE #> [1] \"age\" #> #> $B2 #> [1] \"bmi\" \"hyp\" #> #> $edu #> [1] \"edu\" #>"},{"path":"https://amices.org/mice/reference/name.formulas.html","id":null,"dir":"Reference","previous_headings":"","what":"Name formula list elements — name.formulas","title":"Name formula list elements — name.formulas","text":"helper function names unnamed elements formula list. convenience function.","code":""},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Name formula list elements — name.formulas","text":"","code":"name.formulas(formulas, prefix = \"F\")"},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Name formula list elements — name.formulas","text":"formulas named list formula's, expressions can converted formula's .formula. List elements correspond blocks. block list element applies identified name, list names must correspond block names. formulas argument alternative predictorMatrix argument allows flexibility specifying imputation models, e.g., specifying interaction terms. prefix character vector length 1 prefix using naming unnamed blocks two variables.","code":""},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Name formula list elements — name.formulas","text":"Named list formulas","code":""},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Name formula list elements — name.formulas","text":"function name unnamed list elements specified optional argument formula. Unnamed formula's consisting just one response variable named variable. Unnamed formula's containing one variable named prefix argument, padded integer sequence stating 1.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/name.formulas.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Name formula list elements — name.formulas","text":"","code":"# fully conditionally specified main effects model form1 <- list( bmi ~ age + chl + hyp, hyp ~ age + bmi + chl, chl ~ age + bmi + hyp ) form1 <- name.formulas(form1) imp1 <- mice(nhanes, formulas = form1, print = FALSE, m = 1, seed = 12199) # same model using dot notation form2 <- list(bmi ~ ., hyp ~ ., chl ~ .) form2 <- name.formulas(form2) imp2 <- mice(nhanes, formulas = form2, print = FALSE, m = 1, seed = 12199) identical(complete(imp1), complete(imp2)) #> [1] FALSE # same model using repeated multivariate imputation form3 <- name.blocks(list(all = bmi + hyp + chl ~ .)) imp3 <- mice(nhanes, formulas = form3, print = FALSE, m = 1, seed = 12199) cmp3 <- complete(imp3) identical(complete(imp1), complete(imp3)) #> [1] FALSE # same model using predictorMatrix imp4 <- mice(nhanes, print = FALSE, m = 1, seed = 12199, auxiliary = TRUE) identical(complete(imp1), complete(imp4)) #> [1] FALSE # different model: multivariate imputation for chl and bmi form5 <- list(chl + bmi ~ ., hyp ~ bmi + age) form5 <- name.formulas(form5) imp5 <- mice(nhanes, formulas = form5, print = FALSE, m = 1, seed = 71712)"},{"path":"https://amices.org/mice/reference/ncc.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of complete cases — ncc","title":"Number of complete cases — ncc","text":"Calculates number complete cases.","code":""},{"path":"https://amices.org/mice/reference/ncc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of complete cases — ncc","text":"","code":"ncc(x)"},{"path":"https://amices.org/mice/reference/ncc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of complete cases — ncc","text":"x R object. Currently supported methods following classes: mids, data.frame matrix. Also, x can vector.","code":""},{"path":"https://amices.org/mice/reference/ncc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of complete cases — ncc","text":"Number elements x complete data.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/ncc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Number of complete cases — ncc","text":"Stef van Buuren, 2017","code":""},{"path":"https://amices.org/mice/reference/ncc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of complete cases — ncc","text":"","code":"ncc(nhanes) # 13 complete cases #> [1] 13"},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"Calculates cumulative hazard rate (Nelson-Aalen estimator)","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"","code":"nelsonaalen(data, timevar, statusvar)"},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"data data frame containing data. timevar name time variable data. statusvar name event variable, e.g. death data.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"vector nrow(data) elements containing Nelson-Aalen estimates cumulative hazard function.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"function useful imputing variables depend survival time. White Royston (2009) suggested using cumulative hazard survival time H0(T) rather T log(T) predictor imputation models. See section 7.1 Van Buuren (2012) example.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"White, . R., Royston, P. (2009). Imputing missing covariate values Cox model. Statistics Medicine, 28(15), 1982-1998. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"Stef van Buuren, 2012","code":""},{"path":"https://amices.org/mice/reference/nelsonaalen.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cumulative hazard rate or Nelson-Aalen estimator — nelsonaalen","text":"","code":"require(MASS) #> Loading required package: MASS #> #> Attaching package: ‘MASS’ #> The following object is masked from ‘package:dplyr’: #> #> select leuk$status <- 1 ## no censoring occurs in leuk data (MASS) ch <- nelsonaalen(leuk, time, status) plot(x = leuk$time, y = ch, ylab = \"Cumulative hazard\", xlab = \"Time\") ### See example on http://www.engineeredsoftware.com/lmar/pe_cum_hazard_function.htm time <- c(43, 67, 92, 94, 149, rep(149, 7)) status <- c(rep(1, 5), rep(0, 7)) eng <- data.frame(time, status) ch <- nelsonaalen(eng, time, status) plot(x = time, y = ch, ylab = \"Cumulative hazard\", xlab = \"Time\")"},{"path":"https://amices.org/mice/reference/nhanes.html","id":null,"dir":"Reference","previous_headings":"","what":"NHANES example - all variables numerical — nhanes","title":"NHANES example - all variables numerical — nhanes","text":"small data set non-monotone missing values.","code":""},{"path":"https://amices.org/mice/reference/nhanes.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"NHANES example - all variables numerical — nhanes","text":"data frame 25 observations following 4 variables. age Age group (1=20-39, 2=40-59, 3=60+) bmi Body mass index (kg/m**2) hyp Hypertensive (1=,2=yes) chl Total serum cholesterol (mg/dL)","code":""},{"path":"https://amices.org/mice/reference/nhanes.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"NHANES example - all variables numerical — nhanes","text":"Schafer, J.L. (1997). Analysis Incomplete Multivariate Data. London: Chapman & Hall. Table 6.14.","code":""},{"path":"https://amices.org/mice/reference/nhanes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"NHANES example - all variables numerical — nhanes","text":"small data set numerical variables. data set nhanes2 data set, age hyp treated factors.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nhanes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"NHANES example - all variables numerical — nhanes","text":"","code":"# create 5 imputed data sets imp <- mice(nhanes) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # print the first imputed data set complete(imp) #> age bmi hyp chl #> 1 1 25.5 1 187 #> 2 2 22.7 1 187 #> 3 1 27.2 1 187 #> 4 3 24.9 2 218 #> 5 1 20.4 1 113 #> 6 3 20.4 1 184 #> 7 1 22.5 1 118 #> 8 1 30.1 1 187 #> 9 2 22.0 1 238 #> 10 2 30.1 2 218 #> 11 1 27.2 1 187 #> 12 2 27.2 2 206 #> 13 3 21.7 1 206 #> 14 2 28.7 2 204 #> 15 1 29.6 1 238 #> 16 1 26.3 1 187 #> 17 3 27.2 2 284 #> 18 2 26.3 2 199 #> 19 1 35.3 1 218 #> 20 3 25.5 2 206 #> 21 1 35.3 1 204 #> 22 1 33.2 1 229 #> 23 1 27.5 1 131 #> 24 3 24.9 1 206 #> 25 2 27.4 1 186"},{"path":"https://amices.org/mice/reference/nhanes2.html","id":null,"dir":"Reference","previous_headings":"","what":"NHANES example - mixed numerical and discrete variables — nhanes2","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"small data set non-monotone missing values.","code":""},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"data frame 25 observations following 4 variables. age Age group (1=20-39, 2=40-59, 3=60+) bmi Body mass index (kg/m**2) hyp Hypertensive (1=,2=yes) chl Total serum cholesterol (mg/dL)","code":""},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"Schafer, J.L. (1997). Analysis Incomplete Multivariate Data. London: Chapman & Hall. Table 6.14.","code":""},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"small data set missing data mixed numerical discrete variables. data set nhanes data set, data treated numerical.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nhanes2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"NHANES example - mixed numerical and discrete variables — nhanes2","text":"","code":"# create 5 imputed data sets imp <- mice(nhanes2) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl # print the first imputed data set complete(imp) #> age bmi hyp chl #> 1 20-39 25.5 no 118 #> 2 40-59 22.7 no 187 #> 3 20-39 26.3 no 187 #> 4 60-99 22.7 yes 218 #> 5 20-39 20.4 no 113 #> 6 60-99 21.7 yes 184 #> 7 20-39 22.5 no 118 #> 8 20-39 30.1 no 187 #> 9 40-59 22.0 no 238 #> 10 40-59 24.9 no 204 #> 11 20-39 29.6 no 187 #> 12 40-59 22.0 no 229 #> 13 60-99 21.7 no 206 #> 14 40-59 28.7 yes 204 #> 15 20-39 29.6 no 238 #> 16 20-39 29.6 no 238 #> 17 60-99 27.2 yes 284 #> 18 40-59 26.3 yes 199 #> 19 20-39 35.3 no 218 #> 20 60-99 25.5 yes 206 #> 21 20-39 22.5 no 238 #> 22 20-39 33.2 no 229 #> 23 20-39 27.5 no 131 #> 24 60-99 24.9 no 206 #> 25 40-59 27.4 no 186"},{"path":"https://amices.org/mice/reference/nic.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of incomplete cases — nic","title":"Number of incomplete cases — nic","text":"Calculates number incomplete cases.","code":""},{"path":"https://amices.org/mice/reference/nic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of incomplete cases — nic","text":"","code":"nic(x)"},{"path":"https://amices.org/mice/reference/nic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of incomplete cases — nic","text":"x R object. Currently supported methods following classes: mids, data.frame matrix. Also, x can vector.","code":""},{"path":"https://amices.org/mice/reference/nic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of incomplete cases — nic","text":"Number elements x incomplete data.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Number of incomplete cases — nic","text":"Stef van Buuren, 2017","code":""},{"path":"https://amices.org/mice/reference/nic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of incomplete cases — nic","text":"","code":"nic(nhanes) # the remaining 12 rows #> [1] 12 nic(nhanes[, c(\"bmi\", \"hyp\")]) # number of cases with incomplete bmi and hyp #> [1] 9"},{"path":"https://amices.org/mice/reference/nimp.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of imputations per block — nimp","title":"Number of imputations per block — nimp","text":"Calculates number cells within block imputation requested.","code":""},{"path":"https://amices.org/mice/reference/nimp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of imputations per block — nimp","text":"","code":"nimp(where, blocks = make.blocks(where))"},{"path":"https://amices.org/mice/reference/nimp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of imputations per block — nimp","text":"data frame matrix logicals dimensions data indicating data imputations created. default, = .na(data), specifies missing data imputed. argument may used overimpute observed data, skip imputations selected missing values. Note: Imputation methods generate imptutations outside mice, like mice.impute.panImpute() may depend complete predictor space. case, custom matrix can specified. blocks List vectors variable names per block. List elements may named identify blocks. Variables within block imputed multivariate imputation method (see method argument). default variable placed block, effectively fully conditional specification (FCS) univariate models (variable--variable imputation). variables whose names appear blocks imputed. relevant columns matrix set FALSE variables block members. variable may appear multiple blocks. case, effectively re-imputed time visited.","code":""},{"path":"https://amices.org/mice/reference/nimp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of imputations per block — nimp","text":"numeric vector length length(blocks) containing number cells need imputed within block.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/nimp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Number of imputations per block — nimp","text":"","code":"where <- is.na(nhanes) # standard FCS nimp(where) #> age bmi hyp chl #> 0 9 8 10 # user-defined blocks nimp(where, blocks = name.blocks(list(c(\"bmi\", \"hyp\"), \"age\", \"chl\"))) #> B1 age chl #> 17 0 10"},{"path":"https://amices.org/mice/reference/norm.draw.html","id":null,"dir":"Reference","previous_headings":"","what":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"function draws random values beta sigma Bayesian linear regression model described Rubin (1987, p. 167). function can called user-specified imputation functions.","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"","code":"norm.draw(y, ry, x, rank.adjust = TRUE, ...) .norm.draw(y, ry, x, rank.adjust = TRUE, ...)"},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"y Incomplete data vector length n ry Vector missing data pattern (FALSE=missing, TRUE=observed) x Matrix (n x p) complete covariates. rank.adjust Argument specifies whether NA's coefficients need set zero. relevant ls.meth = \"qr\" predictor matrix rank-deficient. ... named arguments.","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"list containing components coef (least squares estimate), beta (drawn regression weights) sigma (drawn value residual standard deviation).","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"Rubin, D.B. (1987). Multiple imputation nonresponse surveys. New York: Wiley.","code":""},{"path":"https://amices.org/mice/reference/norm.draw.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Draws values of beta and sigma by Bayesian linear regression — norm.draw","text":"Gerko Vink, 2018, version, based earlier versions written Stef van Buuren, Karin Groothuis-Oudshoorn, 2017","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function that runs MICE in parallel — parlmice","title":"Wrapper function that runs MICE in parallel — parlmice","text":"function included backward compatibility. function superseded futuremice.","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function that runs MICE in parallel — parlmice","text":"","code":"parlmice( data, m = 5, seed = NA, cluster.seed = NA, n.core = NULL, n.imp.core = NULL, cl.type = \"PSOCK\", ... )"},{"path":"https://amices.org/mice/reference/parlmice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function that runs MICE in parallel — parlmice","text":"data data frame matrix containing incomplete data. Similar first argument mice. m number desired imputated datasets. default $m=5$ mice seed scalar used seed value mice algorithm within parallel stream. Please note imputations streams , hence, used n.core = 1 desired obtain output mice. cluster.seed scalar used seed value. recommended put seed value outside function, otherwise parallel processes performed separate, random seeds. n.core scalar indicating number cores used. n.imp.core scalar indicating number imputations per core. cl.type cluster type. Default value \"PSOCK\". Posix machines (linux, Mac) generally benefit much faster cluster computation type set type = \"FORK\". ... Named arguments passed function mice makeCluster.","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function that runs MICE in parallel — parlmice","text":"mids object defined mids-class","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrapper function that runs MICE in parallel — parlmice","text":"function relies package parallel, base package R versions 2.14.0 later. chosen use parallel function parLapply allow use parlmice Mac, Linux Windows systems. reason, use Parallel Socket Cluster (PSOCK) type default. systems Windows, can hugely beneficial change cluster type FORK, generally results improved memory handling. memory issues arise Windows system, advise store multiply imputed datasets, clean memory using rm gc make another run using settings. wrapper function combines output parLapply function ibind mice. mids object returned can used analyses. Note seed value desired, seed entered function argument seed. Seed values outside wrapper function (R-script passed mice) result reproducible results. refer manual parallel explanation matter.","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wrapper function that runs MICE in parallel — parlmice","text":"Schouten, R. Vink, G. (2017). parlmice: faster, paraleller, micer. https://www.gerkovink.com/parlMICE/Vignette_parlMICE.html Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/parlmice.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper function that runs MICE in parallel — parlmice","text":"Gerko Vink, Rianne Schouten","code":""},{"path":"https://amices.org/mice/reference/parlmice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrapper function that runs MICE in parallel — parlmice","text":"","code":"# 150 imputations in dataset nhanes, performed by 3 cores if (FALSE) { # \\dontrun{ imp1 <- parlmice(data = nhanes, n.core = 3, n.imp.core = 50) # Making use of arguments in mice. imp2 <- parlmice(data = nhanes, method = \"norm.nob\", m = 100) imp2$method fit <- with(imp2, lm(bmi ~ hyp)) pool(fit) } # }"},{"path":"https://amices.org/mice/reference/pattern.html","id":null,"dir":"Reference","previous_headings":"","what":"Datasets with various missing data patterns — pattern","title":"Datasets with various missing data patterns — pattern","text":"Four simple datasets various missing data patterns","code":""},{"path":"https://amices.org/mice/reference/pattern.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Datasets with various missing data patterns — pattern","text":"list(\"pattern1\") Data univariate missing data pattern list(\"pattern2\") Data monotone missing data pattern list(\"pattern3\") Data file matching missing data pattern list(\"pattern4\") Data general missing data pattern Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/pattern.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Datasets with various missing data patterns — pattern","text":"Van Buuren (2012) uses four artificial datasets illustrate various missing data patterns.","code":""},{"path":"https://amices.org/mice/reference/pattern.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Datasets with various missing data patterns — pattern","text":"","code":"pattern4 #> A B C #> 25 26 88 32 #> 26 42 66 21 #> 27 86 54 NA #> 28 9 92 NA #> 29 20 83 NA #> 30 89 NA 41 #> 31 NA NA 35 #> 32 NA NA 33 data <- rbind(pattern1, pattern2, pattern3, pattern4) mdpat <- cbind(expand.grid(rec = 8:1, pat = 1:4, var = 1:3), r = as.numeric(as.vector(is.na(data)))) types <- c(\"Univariate\", \"Monotone\", \"File matching\", \"General\") tp41 <- lattice::levelplot(r ~ var + rec | as.factor(pat), data = mdpat, as.table = TRUE, aspect = \"iso\", shrink = c(0.9), col.regions = mdc(1:2), colorkey = FALSE, scales = list(draw = FALSE), xlab = \"\", ylab = \"\", between = list(x = 1, y = 0), strip = lattice::strip.custom( bg = \"grey95\", style = 1, factor.levels = types ) ) print(tp41) md.pattern(pattern4) #> A B C #> 2 1 1 1 0 #> 3 1 1 0 1 #> 1 1 0 1 1 #> 2 0 0 1 2 #> 2 3 3 8 p <- md.pairs(pattern4) p #> $rr #> A B C #> A 6 5 3 #> B 5 5 2 #> C 3 2 5 #> #> $rm #> A B C #> A 0 1 3 #> B 0 0 3 #> C 2 3 0 #> #> $mr #> A B C #> A 0 0 2 #> B 1 0 3 #> C 3 3 0 #> #> $mm #> A B C #> A 2 2 0 #> B 2 3 0 #> C 0 0 3 #> ### proportion of usable cases p$mr / (p$mr + p$mm) #> A B C #> A 0.0000000 0 1 #> B 0.3333333 0 1 #> C 1.0000000 1 0 ### outbound statistics p$rm / (p$rm + p$rr) #> A B C #> A 0.0 0.1666667 0.5 #> B 0.0 0.0000000 0.6 #> C 0.4 0.6000000 0.0 fluxplot(pattern2)"},{"path":"https://amices.org/mice/reference/plot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the trace lines of the MICE algorithm — plot.mids","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"Trace line plots portray value estimate iteration number. estimate can anything can calculate, typically chosen parameter scientific interest. plot method mids object plots mean standard deviation imputed (observed) values iteration number $m$ replications. default, function plot development mean standard deviation incomplete variable. convergence, streams intermingle free trend.","code":""},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"","code":"# S3 method for class 'mids' plot( x, y = NULL, theme = mice.theme(), layout = c(2, 3), type = \"l\", col = 1:10, lty = 1, ... )"},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"x object class mids y formula specifies variables, stream iterations plotted. omitted, streams, variables iterations plotted. theme trellis theme applied graphs. default mice.theme(). layout vector length 2 given number columns rows plot. default c(2, 3). type Parameter type panel.xyplot. col Parameter col panel.xyplot. lty Parameter lty panel.xyplot. ... Extra arguments xyplot.","code":""},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"object class \"trellis\".","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"Stef van Buuren 2011","code":""},{"path":"https://amices.org/mice/reference/plot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot the trace lines of the MICE algorithm — plot.mids","text":"","code":"imp <- mice(nhanes, print = FALSE) plot(imp, bmi + chl ~ .it | .ms, layout = c(2, 1))"},{"path":"https://amices.org/mice/reference/pmm.match.html","id":null,"dir":"Reference","previous_headings":"","what":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"function finds matches among observed data predictive mean metric. selects donors closest matches, randomly samples one donors, returns observed value match.","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"","code":".pmm.match(z, yhat = yhat, y = y, donors = 5, ...)"},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"z scalar containing predicted value current case imputed. yhat vector containing predicted values cases observed outcome. y vector length(yhat) elements containing observed outcome donors size donor pool among draw made. default donors = 5. Setting donors = 1 always selects closest match. Values 3 10 provide best results. Note: setting changed 3 5 version 2.19, based simulation work Tim Morris (UCL). ... parameters (used).","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"scalar containing observed value selected donor.","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"function included backward compatibility. used mice 2.21. current mice.impute.pmm() function calls faster C function matcher instead .pmm.match().","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"Schenker N & Taylor JMG (1996) Partially parametric techniques multiple imputation. Computational Statistics Data Analysis, 22, 425-446. Little RJA (1988) Missing-data adjustments large surveys (discussion). Journal Business Economics Statistics, 6, 287-301.","code":""},{"path":"https://amices.org/mice/reference/pmm.match.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Finds an imputed value from matches in the predictive metric (deprecated) — .pmm.match","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":null,"dir":"Reference","previous_headings":"","what":"Compare two nested models fitted to imputed data — pool.compare","title":"Compare two nested models fitted to imputed data — pool.compare","text":"function deprecated V3. Use D1 D3 instead.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compare two nested models fitted to imputed data — pool.compare","text":"","code":"pool.compare(fit1, fit0, method = c(\"wald\", \"likelihood\"), data = NULL)"},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compare two nested models fitted to imputed data — pool.compare","text":"fit1 object class 'mira', produced .mids(). fit0 object class 'mira', produced .mids(). model fit0 nested fit0 fit1. method Either \"wald\" \"likelihood\" specifying type comparison. default \"wald\". data longer used.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compare two nested models fitted to imputed data — pool.compare","text":"list containing several components. Component call call pool.compare function. Component call11 call created fit1. Component call12 call created imputations. Component call01 call created fit0. Component call02 call created imputations. Components method method used compare two models: 'Wald' 'likelihood'. Component nmis number missing entries variable. Component m number imputations. Component qhat1 matrix, containing estimated coefficients m repeated complete data analyses fit1. Component qhat0 matrix, containing estimated coefficients m repeated complete data analyses fit0. Component ubar1 mean variances fit1, formula (3.1.3), Rubin (1987). Component ubar0 mean variances fit0, formula (3.1.3), Rubin (1987). Component qbar1 pooled estimate fit1, formula (3.1.2) Rubin (1987). Component qbar0 pooled estimate fit0, formula (3.1.2) Rubin (1987). Component Dm test statistic. Component rm relative increase variance due nonresponse, formula (3.1.7), Rubin (1987). Component df1: df1 = null hypothesis assumed Dm F distribution (df1,df2) degrees freedom. Component df2: df2. Component pvalue P-value testing whether model fit1 statistically different smaller fit0.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compare two nested models fitted to imputed data — pool.compare","text":"Compares two nested models m repeated complete data analysis function based article Meng Rubin (1992). Wald-method can found paragraph 2.2 likelihood method can found paragraph 3. One use Wald method comparison linear models obtained e.g. lm (.mids()). likelihood method used case logistic regression models obtained glm() .mids(). function assumes fit1 larger model, model fit0 fully contained fit1. case method='wald', null hypothesis tested extra parameters zero.","code":""},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compare two nested models fitted to imputed data — pool.compare","text":"Li, K.H., Meng, X.L., Raghunathan, T.E. Rubin, D. B. (1991). Significance levels repeated p-values multiply-imputed data. Statistica Sinica, 1, 65-92. Meng, X.L. Rubin, D.B. (1992). Performing likelihood ratio tests multiple-imputed data sets. Biometrika, 79, 103-111. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.compare.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compare two nested models fitted to imputed data — pool.compare","text":"Karin Groothuis-Oudshoorn Stef van Buuren, 2009","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine estimates by pooling rules — pool","title":"Combine estimates by pooling rules — pool","text":"pool() function combines estimates m repeated complete data analyses. typical sequence steps perform multiple imputation analysis : Impute missing data mice() function, resulting multiple imputed data set (class mids); Fit model interest (scientific model) imputed data set () function, resulting object class mira; Pool estimates model single set estimates standard errors, resulting object class mipo; Optionally, compare pooled estimates different scientific models D1() D3() functions. common error reverse steps 2 3, .e., pool multiply-imputed data instead estimates. may severely bias estimates scientific interest yield incorrect statistical intervals p-values. pool() function detect case.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine estimates by pooling rules — pool","text":"","code":"pool(object, dfcom = NULL, rule = NULL, custom.t = NULL) pool.syn(object, dfcom = NULL, rule = \"reiter2003\")"},{"path":"https://amices.org/mice/reference/pool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine estimates by pooling rules — pool","text":"object object class mira (produced .mids() .mira()), list model fits. dfcom positive number representing degrees freedom complete-data analysis. Normally, number independent observation minus number fitted parameters. default (dfcom = NULL) extract information following order: 1) component residual.df returned glance() glance() function found, 2) result df.residual( applied first fitted model, 3) 999999. last case, warning \"Large sample assumed\" printed. degrees freedom incorrect, specify appropriate value manually. rule string indicating pooling rule. Currently supported \"rubin1987\" (default, missing data) \"reiter2003\" (synthetic data created complete data set). custom.t custom character string parsed calculation rule total variance t. custom rule can use calculated pooling statistics dimensions must come .data$. default t calculation form \".data$ubar + (1 + 1 / .data$m) * .data$b\". See examples example.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine estimates by pooling rules — pool","text":"object class mipo, stands 'multiple imputation pooled outcome'. rule \"reiter2003\" values lambda fmi set `NA`, statistics apply data synthesised fully observed data.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine estimates by pooling rules — pool","text":"pool() function averages estimates complete data model, computes total variance repeated analyses Rubin's rules (Rubin, 1987, p. 76), computes following diagnostic statistics per estimate: Relative increase variance due nonresponse r; Residual degrees freedom hypothesis testing df; Proportion total variance due missingness lambda; Fraction missing information fmi. degrees freedom calculation pooled estimates uses Barnard-Rubin adjustment small samples (Barnard Rubin, 1999). pool.syn() function combines estimates Reiter's partially synthetic data pooling rules (Reiter, 2003). combination rule assumes data synthesised completely observed. Pooling differs Rubin's method calculation total variance degrees freedom. Pooling requires following input fitted model: estimates model; standard error estimate; residual degrees freedom model. pool() pool.syn() functions rely broom::tidy broom::glance extracting parameters. Since mice 3.0+, broom package takes care filtering relevant parts complete-data analysis. may happen see messages like Error: tidy method objects class ... Error: glance method objects class .... message means complete-data method used (imp, ...) tidy glance method defined broom package. broom.mixed package contains tidy glance methods mixed models. using mixed model, first run library(broom.mixed) calling pool(). tidy glance methods defined analysis tabulate m parameter estimates variance estimates (square standard errors) m fitted models stored fit$analyses. parameter, run pool.scalar obtain pooled parameters estimate, variance, degrees freedom, relative increase variance fraction missing information. alternative write glance() tidy() methods add broom according specifications given https://broom.tidymodels.org. versions prior mice 3.0 pooling required coef() vcov() methods available fitted objects. feature longer supported. reason vcov() methods inconsistent across packages, leading buggy behaviour pool() function. Since mice 3.13.2 function pool() uses robust standard error estimate pooling can extract robust.se tidy() object.","code":""},{"path":"https://amices.org/mice/reference/pool.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Combine estimates by pooling rules — pool","text":"Barnard, J. Rubin, D.B. (1999). Small sample degrees freedom multiple imputation. Biometrika, 86, 948-955. Rubin, D.B. (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley Sons. Reiter, J.P. (2003). Inference Partially Synthetic, Public Use Microdata Sets. Survey Methodology, 29, 181-189. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine estimates by pooling rules — pool","text":"","code":"# impute missing data, analyse and pool using the classic MICE workflow imp <- mice(nhanes, maxit = 2, m = 2) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl fit <- with(data = imp, exp = lm(bmi ~ hyp + chl)) summary(pool(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 20.60793363 4.64881537 4.4329430 10.12935 0.001229288 #> 2 hyp 0.21992681 1.99646262 0.1101582 19.71919 0.913397289 #> 3 chl 0.02823202 0.02531475 1.1152403 11.47827 0.287552697 # generate fully synthetic data, analyse and pool imp <- mice(cars, maxit = 2, m = 2, where = matrix(TRUE, nrow(cars), ncol(cars)) ) #> #> iter imp variable #> 1 1 speed dist #> 1 2 speed dist #> 2 1 speed dist #> 2 2 speed dist fit <- with(data = imp, exp = lm(speed ~ dist)) summary(pool.syn(fit)) #> term estimate std.error statistic df p.value #> 1 (Intercept) 11.45981833 1.35768034 8.440734 9.843846 8.128227e-06 #> 2 dist 0.08662892 0.03546026 2.442986 2.896935 9.529340e-02 # use a custom pooling rule for the total variance about the estimate # e.g. use t = b + b/m instead of t = ubar + b + b/m imp <- mice(nhanes, maxit = 2, m = 2) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl fit <- with(data = imp, exp = lm(bmi ~ hyp + chl)) pool(fit, custom.t = \".data$b + .data$b / .data$m\") #> Class: mipo m = 2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 24.13311859 2.244648e+01 6.5406334371 9.8109501556 22 0 #> 2 hyp 2 -2.26888722 4.854083e+00 0.2991634667 0.4487452001 22 0 #> 3 chl 2 0.02693878 6.328178e-04 0.0001986903 0.0002980354 22 0 #> riv lambda fmi #> 1 0.43708196 1 0.7680485 #> 2 0.09244696 1 0.6948746 #> 3 0.47096565 1 0.7733915"},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":null,"dir":"Reference","previous_headings":"","what":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"function pools coefficients determination R^2 adjusted coefficients determination (R^2_a) obtained lm modeling function. pooling uses Fisher z-transformation.","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"","code":"pool.r.squared(object, adjusted = FALSE)"},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"object object class 'mira' 'mipo', produced lm.mids, .mids, pool lm modeling function. adjusted logical value. adjusted=TRUE adjusted R^2 calculated. default value FALSE.","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"Returns 1x4 table components. Component est pooled R^2 estimate. Component lo95 95 % lower bound pooled R^2. Component hi95 95 % upper bound pooled R^2. Component fmi fraction missing information due nonresponse.","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"Harel, O (2009). estimation R^2 adjusted R^2 incomplete data sets using multiple imputation, Journal Applied Statistics, 36:1109-1118. Rubin, D.B. (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley Sons. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"Karin Groothuis-Oudshoorn Stef van Buuren, 2009","code":""},{"path":"https://amices.org/mice/reference/pool.r.squared.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Pools R^2 of m models fitted to multiply-imputed data — pool.r.squared","text":"","code":"imp <- mice(nhanes, print = FALSE, seed = 16117) fit <- with(imp, lm(chl ~ age + hyp + bmi)) # input: mira object pool.r.squared(fit) #> est lo 95 hi 95 fmi #> R^2 0.4338408 0.06503877 0.7513683 0.4176739 pool.r.squared(fit, adjusted = TRUE) #> est lo 95 hi 95 fmi #> adj R^2 0.3507643 0.01771032 0.7091501 0.4617807 # input: mipo object est <- pool(fit) pool.r.squared(est) #> est lo 95 hi 95 fmi #> R^2 0.4338408 0.06503877 0.7513683 0.4176739 pool.r.squared(est, adjusted = TRUE) #> est lo 95 hi 95 fmi #> adj R^2 0.3507643 0.01771032 0.7091501 0.4617807"},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiple imputation pooling: univariate version — pool.scalar","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Pools univariate estimates m repeated complete data analysis","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"","code":"pool.scalar(Q, U, n = Inf, k = 1, rule = c(\"rubin1987\", \"reiter2003\")) pool.scalar.syn(Q, U, n = Inf, k = 1, rule = \"reiter2003\")"},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Q vector univariate estimates m repeated complete data analyses. U vector containing corresponding m variances univariate estimates. n number providing sample size. nothing specified, infinite sample n = Inf assumed. k number indicating number parameters estimated. default, k = 1 assumed. rule string indicating pooling rule. Currently supported \"rubin1987\" (default, missing data) \"reiter2003\" (synthetic data created complete data set).","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Returns list components. m: Number imputations. qhat: m univariate estimates repeated complete-data analyses. u: corresponding m variances univariate estimates. qbar: pooled univariate estimate, formula (3.1.2) Rubin (1987). ubar: mean variances (.e. pooled within-imputation variance), formula (3.1.3) Rubin (1987). b: -imputation variance, formula (3.1.4) Rubin (1987). t: total variance pooled estimated, formula (3.1.5) Rubin (1987). r: relative increase variance due nonresponse, formula (3.1.7) Rubin (1987). df: degrees freedom t reference distribution method Barnard-Rubin (1999). fmi: fraction missing information due nonresponse, formula (3.1.10) Rubin (1987). (defined synthetic data.)","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"function averages univariate estimates complete data model, computes total variance repeated analyses, computes relative increase variance due missing data data synthesisation fraction missing information.","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Rubin, D.B. (1987). Multiple Imputation Nonresponse Surveys. New York: John Wiley Sons. Reiter, J.P. (2003). Inference Partially Synthetic, Public Use Microdata Sets. Survey Methodology, 29, 181-189.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"Karin Groothuis-Oudshoorn Stef van Buuren, 2009; Thom Volker, 2021","code":""},{"path":"https://amices.org/mice/reference/pool.scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multiple imputation pooling: univariate version — pool.scalar","text":"","code":"# missing data imputation with with manual pooling imp <- mice(nhanes, maxit = 2, m = 2, print = FALSE, seed = 18210) fit <- with(data = imp, lm(bmi ~ age)) # manual pooling summary(fit$analyses[[1]]) #> #> Call: #> lm(formula = bmi ~ age) #> #> Residuals: #> Min 1Q Median 3Q Max #> -6.1587 -3.0674 0.9413 2.3870 8.7413 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 28.1043 1.8853 14.91 2.61e-13 *** #> age -1.5457 0.9723 -1.59 0.126 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 3.957 on 23 degrees of freedom #> Multiple R-squared: 0.099,\tAdjusted R-squared: 0.05983 #> F-statistic: 2.527 on 1 and 23 DF, p-value: 0.1255 #> summary(fit$analyses[[2]]) #> #> Call: #> lm(formula = bmi ~ age) #> #> Residuals: #> Min 1Q Median 3Q Max #> -7.3611 -3.6333 0.9389 2.3389 7.5389 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 29.189 2.019 14.460 4.92e-13 *** #> age -1.428 1.041 -1.371 0.183 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 4.236 on 23 degrees of freedom #> Multiple R-squared: 0.0756,\tAdjusted R-squared: 0.03541 #> F-statistic: 1.881 on 1 and 23 DF, p-value: 0.1835 #> pool.scalar(Q = c(-1.5457, -1.428), U = c(0.9723^2, 1.041^2), n = 25, k = 2) #> $m #> [1] 2 #> #> $qhat #> [1] -1.5457 -1.4280 #> #> $u #> [1] 0.9453673 1.0836810 #> #> $qbar #> [1] -1.48685 #> #> $ubar #> [1] 1.014524 #> #> $b #> [1] 0.006926645 #> #> $t #> [1] 1.024914 #> #> $df #> [1] 20.97025 #> #> $r #> [1] 0.01024122 #> #> $fmi #> [1] 0.09272831 #> # check: automatic pooling using broom pool(fit) #> Class: mipo m = 2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 28.646618 3.814682 0.588114658 4.696854 23 10.72144 #> 2 age 2 -1.486715 1.014543 0.006947187 1.024964 23 20.96937 #> riv lambda fmi #> 1 0.2312570 0.18782190 0.30620278 #> 2 0.0102714 0.01016697 0.09275848 # manual pooling for synthetic data created from complete data imp <- mice(cars, maxit = 2, m = 2, print = FALSE, seed = 18210, where = matrix(TRUE, nrow(cars), ncol(cars)) ) fit <- with(data = imp, lm(speed ~ dist)) # manual pooling: extract Q and U summary(fit$analyses[[1]]) #> #> Call: #> lm(formula = speed ~ dist) #> #> Residuals: #> Min 1Q Median 3Q Max #> -6.9740 -2.3144 -0.1494 3.1287 7.4115 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 10.15208 1.06236 9.556 1.10e-12 *** #> dist 0.12182 0.02121 5.744 6.15e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 3.618 on 48 degrees of freedom #> Multiple R-squared: 0.4074,\tAdjusted R-squared: 0.395 #> F-statistic: 33 on 1 and 48 DF, p-value: 6.147e-07 #> summary(fit$analyses[[2]]) #> #> Call: #> lm(formula = speed ~ dist) #> #> Residuals: #> Min 1Q Median 3Q Max #> -7.5830 -3.1680 -0.3479 3.3928 8.1902 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 9.46952 1.31136 7.221 3.37e-09 *** #> dist 0.13209 0.02516 5.250 3.43e-06 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 4.271 on 48 degrees of freedom #> Multiple R-squared: 0.3647,\tAdjusted R-squared: 0.3515 #> F-statistic: 27.56 on 1 and 48 DF, p-value: 3.428e-06 #> pool.scalar.syn(Q = c(0.12182, 0.13209), U = c(0.02121^2, 0.02516^2), n = 50, k = 2) #> $m #> [1] 2 #> #> $qhat #> [1] 0.12182 0.13209 #> #> $u #> [1] 0.0004498641 0.0006330256 #> #> $qbar #> [1] 0.126955 #> #> $ubar #> [1] 0.0005414448 #> #> $b #> [1] 5.273645e-05 #> #> $t #> [1] 0.0005678131 #> #> $df #> [1] 463.7127 #> #> $r #> [1] 0.1460992 #> #> $fmi #> [1] NA #> # check: automatic pooling using broom pool.syn(fit) #> Class: mipo m = 2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 9.8108000 1.4241330840 2.329428e-01 1.5406044600 48 174.9621 #> 2 dist 2 0.1269552 0.0005414288 5.273011e-05 0.0005677938 48 463.7928 #> riv lambda fmi #> 1 0.2453522 NA NA #> 2 0.1460860 NA NA"},{"path":"https://amices.org/mice/reference/pool.table.html","id":null,"dir":"Reference","previous_headings":"","what":"Combines estimates from a tidy table — pool.table","title":"Combines estimates from a tidy table — pool.table","text":"Combines estimates tidy table","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combines estimates from a tidy table — pool.table","text":"","code":"pool.table( w, type = c(\"all\", \"minimal\", \"tests\"), conf.int = TRUE, conf.level = 0.95, exponentiate = FALSE, dfcom = Inf, custom.t = NULL, rule = c(\"rubin1987\", \"reiter2003\"), ... )"},{"path":"https://amices.org/mice/reference/pool.table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combines estimates from a tidy table — pool.table","text":"w data.frame parameter estimates tidy format (see details). type string, either \"minimal\", \"tests\" \"\". Use minimal mimick output summary(pool(fit)). default \"\". conf.int Logical indicating whether include confidence interval. conf.level Confidence level interval, used conf.int = TRUE. Number 0 1. exponentiate Flag indicating whether exponentiate coefficient estimates confidence intervals (typical logistic regression). dfcom positive number representing degrees freedom residuals complete-data analysis. dfcom argument used Barnard-Rubin adjustment. linear regression, dfcom equivalent number independent observation minus number fitted parameters, expression becomes complex regularized, proportional hazards, semi-parametric techniques. used w lacks column named \"df.residual\". custom.t custom character string parsed calculation rule total variance t. custom rule can use calculated pooling statistics. default t calculation form \".data$ubar + (1 + 1 / .data$m) * .data$b\". rule string indicating pooling rule. Currently supported \"rubin1987\" (default, analyses applied multiply-imputed incomplete data) \"reiter2003\" (analyses applied synthetic data created complete data). ... Arguments passed ","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combines estimates from a tidy table — pool.table","text":"pool.table() returns data.frame aggregated estimates, standard errors, confidence intervals statistical tests. meaning columns follows:","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combines estimates from a tidy table — pool.table","text":"input data w data.frame columns named: Columns 1-3 obligatory. Column 4 optional. Usually, entries column 4 . user can omit column 4, specify argument pool.table(..., dfcom = ...) instead. given, column residual.df takes precedence. neither specified, mice tries calculate residual degrees freedom. fails (e.g. information sample size), mice sets dfcom = Inf. value dfcom = Inf acceptable large samples (n > 1000) relatively concise parametric models.","code":""},{"path":"https://amices.org/mice/reference/pool.table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combines estimates from a tidy table — pool.table","text":"","code":"# conventional mice workflow imp <- mice(nhanes2, m = 2, maxit = 2, seed = 1, print = FALSE) fit <- with(imp, lm(chl ~ age + bmi + hyp)) pld1 <- pool(fit) pld1$pooled #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 2.979488 3081.702712 16.77783124 3106.869459 20 18.09145 #> 2 age40-59 2 52.005346 367.726421 13.68301760 388.250947 20 16.49810 #> 3 age60-99 2 70.077449 498.129498 112.28149168 666.551735 20 7.29272 #> 4 bmi 2 6.006762 3.897692 0.02197335 3.930652 20 18.08472 #> 5 hypyes 2 -4.347543 408.567912 6.75735741 418.703948 20 17.63466 #> riv lambda fmi #> 1 0.008166507 0.008100355 0.1021574 #> 2 0.055814663 0.052864073 0.1500157 #> 3 0.338109344 0.252676917 0.3978908 #> 4 0.008456294 0.008385384 0.1024454 #> 5 0.024808694 0.024208122 0.1187861 # using pool.table() on tidy table tbl <- summary(fit)[, c(\"term\", \"estimate\", \"std.error\", \"df.residual\")] tbl #> # A tibble: 10 × 4 #> term estimate std.error df.residual #> #> 1 (Intercept) 0.0831 58.1 20 #> 2 age40-59 49.4 19.8 20 #> 3 age60-99 62.6 22.7 20 #> 4 bmi 5.90 2.07 20 #> 5 hypyes -2.51 22.1 20 #> 6 (Intercept) 5.88 52.8 20 #> 7 age40-59 54.6 18.6 20 #> 8 age60-99 77.6 21.9 20 #> 9 bmi 6.11 1.87 20 #> 10 hypyes -6.19 18.1 20 pld2 <- pool.table(tbl, type = \"minimal\") pld2 #> term m estimate ubar b t dfcom df #> 1 (Intercept) 2 2.979488 3081.702712 16.77783124 3106.869459 20 18.09145 #> 2 age40-59 2 52.005346 367.726421 13.68301760 388.250947 20 16.49810 #> 3 age60-99 2 70.077449 498.129498 112.28149168 666.551735 20 7.29272 #> 4 bmi 2 6.006762 3.897692 0.02197335 3.930652 20 18.08472 #> 5 hypyes 2 -4.347543 408.567912 6.75735741 418.703948 20 17.63466 #> riv lambda fmi #> 1 0.008166507 0.008100355 0.1021574 #> 2 0.055814663 0.052864073 0.1500157 #> 3 0.338109344 0.252676917 0.3978908 #> 4 0.008456294 0.008385384 0.1024454 #> 5 0.024808694 0.024208122 0.1187861 identical(pld1$pooled, pld2) #> [1] TRUE # conventional workflow: all numerical output all1 <- summary(pld1, type = \"all\", conf.int = TRUE) all1 #> term m estimate std.error statistic df p.value #> 1 (Intercept) 2 2.979488 55.739299 0.05345398 18.09145 0.957956041 #> 2 age40-59 2 52.005346 19.704085 2.63931807 16.49810 0.017526719 #> 3 age60-99 2 70.077449 25.817663 2.71432191 7.29272 0.028863238 #> 4 bmi 2 6.006762 1.982587 3.02975940 18.08472 0.007175381 #> 5 hypyes 2 -4.347543 20.462257 -0.21246647 17.63466 0.834179684 #> conf.low conf.high riv lambda fmi ubar #> 1 -114.082019 120.04099 0.008166507 0.008100355 0.1021574 3081.702712 #> 2 10.336814 93.67388 0.055814663 0.052864073 0.1500157 367.726421 #> 3 9.521628 130.63327 0.338109344 0.252676917 0.3978908 498.129498 #> 4 1.842899 10.17062 0.008456294 0.008385384 0.1024454 3.897692 #> 5 -47.401078 38.70599 0.024808694 0.024208122 0.1187861 408.567912 #> b t dfcom #> 1 16.77783124 3106.869459 20 #> 2 13.68301760 388.250947 20 #> 3 112.28149168 666.551735 20 #> 4 0.02197335 3.930652 20 #> 5 6.75735741 418.703948 20 # pool.table workflow: all numerical output all2 <- pool.table(tbl) all2 #> term m estimate std.error statistic df p.value #> 1 (Intercept) 2 2.979488 55.739299 0.05345398 18.09145 0.957956041 #> 2 age40-59 2 52.005346 19.704085 2.63931807 16.49810 0.017526719 #> 3 age60-99 2 70.077449 25.817663 2.71432191 7.29272 0.028863238 #> 4 bmi 2 6.006762 1.982587 3.02975940 18.08472 0.007175381 #> 5 hypyes 2 -4.347543 20.462257 -0.21246647 17.63466 0.834179684 #> conf.low conf.high riv lambda fmi ubar #> 1 -114.082019 120.04099 0.008166507 0.008100355 0.1021574 3081.702712 #> 2 10.336814 93.67388 0.055814663 0.052864073 0.1500157 367.726421 #> 3 9.521628 130.63327 0.338109344 0.252676917 0.3978908 498.129498 #> 4 1.842899 10.17062 0.008456294 0.008385384 0.1024454 3.897692 #> 5 -47.401078 38.70599 0.024808694 0.024208122 0.1187861 408.567912 #> b t dfcom #> 1 16.77783124 3106.869459 20 #> 2 13.68301760 388.250947 20 #> 3 112.28149168 666.551735 20 #> 4 0.02197335 3.930652 20 #> 5 6.75735741 418.703948 20 identical(data.frame(all1), all2) #> [1] TRUE"},{"path":"https://amices.org/mice/reference/popmis.html","id":null,"dir":"Reference","previous_headings":"","what":"Hox pupil popularity data with missing popularity scores — popmis","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"Hox pupil popularity data missing popularity scores","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"data frame 2000 rows 7 columns: pupil Pupil number within school school School number popular Pupil popularity 848 missing entries sex Pupil gender texp Teacher experience (years) const Constant intercept term teachpop Teacher popularity","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"Hox, J. J. (2002) Multilevel analysis. Techniques applications. Mahwah, NJ: Lawrence Erlbaum.","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"original, complete dataset generated Joop Hox example well-behaved multilevel data set. distributed data contains missing data pupil popularity.","code":""},{"path":"https://amices.org/mice/reference/popmis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hox pupil popularity data with missing popularity scores — popmis","text":"","code":"popmis[1:3, ] #> pupil school popular sex texp const teachpop #> 1 1 1 NA 1 24 1 7 #> 2 2 1 NA 0 24 1 7 #> 3 3 1 7 1 24 1 6"},{"path":"https://amices.org/mice/reference/pops.html","id":null,"dir":"Reference","previous_headings":"","what":"Project on preterm and small for gestational age infants (POPS) — pops","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"Subset data POPS study, national, prospective study preterm children, including liveborn infants <32 weeks gestational age /<1500 g 1983 (n = 1338).","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"pops data frame 959 rows 86 columns. pops.pred 86 86 binary predictor matrix used specifying multiple imputation model.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"Hille, E. T. M., Elbertse, L., Bennebroek Gravenhorst, J., Brand, R., Verloove-Vanhorick, S. P. (2005). Nonresponse bias follow-study 19-year-old adolescents born preterm infants. Pediatrics, 116(5):662666. Hille, E. T. M., Weisglas-Kuperus, N., Van Goudoever, J. B., Jacobusse, G. W., Ens-Dokkum, M. H., De Groot, L., Wit, J. M., Geven, W. B., Kok, J. H., De Kleine, M. J. K., Kollee, L. . ., Mulder, . L. M., Van Straaten, H. L. M., De Vries, L. S., Van Weissenbruch, M. M., Verloove-Vanhorick, S. P. (2007). Functional outcomes participation young adulthood preterm low birth weight infants: Dutch project preterm small gestational age infants 19 years age. Pediatrics, 120(3):587595. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"data set concerns subset 959 children survived age 19 years. Hille et al (2005) divided 959 survivors three groups: Full responders (examined outpatient clinic completed questionnaires, n = 596), postal responders (completed mailed questionnaires, n = 109), non-responders (respond mailed requests telephone calls, traced, n = 254). Compared postal non-responders, full response group consists girls, contains Dutch children, higher educational social economic levels fewer handicaps. responders form highly selective subgroup total cohort. Multiple imputation data set described Hille et al (2007) Van Buuren (2012), chapter 8.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"dataset part mice.","code":""},{"path":"https://amices.org/mice/reference/pops.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Project on preterm and small for gestational age infants (POPS) — pops","text":"","code":"pops <- data(pops)"},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":null,"dir":"Reference","previous_headings":"","what":"Potthoff-Roy data — potthoffroy","title":"Potthoff-Roy data — potthoffroy","text":"Data Potthoff-Roy (1964) repeated measures dental fissures.","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Potthoff-Roy data — potthoffroy","text":"tbs data frame 27 rows 6 columns: id Person number sex Sex M/F d8 Distance age 8 years d10 Distance age 10 years d12 Distance age 12 years d14 Distance age 14 years","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Potthoff-Roy data — potthoffroy","text":"Potthoff, R. F., Roy, S. N. (1964). generalized multivariate analysis variance model usefully especially growth curve problems. Biometrika, 51(3), 313-326. Little, R. J. ., Rubin, D. B. (1987). Statistical Analysis Missing Data. New York: John Wiley & Sons. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Potthoff-Roy data — potthoffroy","text":"data set famous Potthoff-Roy data, used demonstrate MANOVA repeated measure data. Potthoff Roy (1964) published classic data study 16 boys 11 girls, ages 8, 10, 12, 14 distance (mm) center pituitary gland pteryomaxillary fissure measured. Changes pituitary-pteryomaxillary distances growth important orthodontic therapy. goals study describe distance boys girls simple functions age, compare functions boys girls. data reanalyzed many authors including Jennrich Schluchter (1986), Little Rubin (1987), Pinheiro Bates (2000), Verbeke Molenberghs (2000) Molenberghs Kenward (2007). See Chapter 9 Van Buuren (2012) challenging exercise using data.","code":""},{"path":"https://amices.org/mice/reference/potthoffroy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Potthoff-Roy data — potthoffroy","text":"","code":"### create missing values at age 10 as in Little and Rubin (1987) phr <- potthoffroy idmis <- c(3, 6, 9, 10, 13, 16, 23, 24, 27) phr[idmis, 4] <- NA phr #> id sex d8 d10 d12 d14 #> 1 1 F 21.0 20.0 21.5 23.0 #> 2 2 F 21.0 21.5 24.0 25.5 #> 3 3 F 20.5 NA 24.5 26.0 #> 4 4 F 23.5 24.5 25.0 26.5 #> 5 5 F 21.5 23.0 22.5 23.5 #> 6 6 F 20.0 NA 21.0 22.5 #> 7 7 F 21.5 22.5 23.0 25.0 #> 8 8 F 23.0 23.0 23.5 24.0 #> 9 9 F 20.0 NA 22.0 21.5 #> 10 10 F 16.5 NA 19.0 19.5 #> 11 11 F 24.5 25.0 28.0 28.0 #> 12 12 M 26.0 25.0 29.0 31.0 #> 13 13 M 21.5 NA 23.0 26.5 #> 14 14 M 23.0 22.5 24.0 27.5 #> 15 15 M 25.5 27.5 26.5 27.0 #> 16 16 M 20.0 NA 22.5 26.0 #> 17 17 M 24.5 25.5 27.0 28.5 #> 18 18 M 22.0 22.0 24.5 26.5 #> 19 19 M 24.0 21.5 24.5 25.5 #> 20 20 M 23.0 20.5 31.0 26.0 #> 21 21 M 27.5 28.0 31.0 31.5 #> 22 22 M 23.0 23.0 23.5 25.0 #> 23 23 M 21.5 NA 24.0 28.0 #> 24 24 M 17.0 NA 26.0 29.5 #> 25 25 M 22.5 25.5 25.5 26.0 #> 26 26 M 23.0 24.5 26.0 30.0 #> 27 27 M 22.0 NA 23.5 25.0 md.pattern(phr) #> id sex d8 d12 d14 d10 #> 18 1 1 1 1 1 1 0 #> 9 1 1 1 1 1 0 1 #> 0 0 0 0 0 9 9"},{"path":"https://amices.org/mice/reference/print.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a mids object — print.mids","title":"Print a mids object — print.mids","text":"Print mids object Print mira object Print mice.anova object Print summary.mice.anova object","code":""},{"path":"https://amices.org/mice/reference/print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a mids object — print.mids","text":"","code":"# S3 method for class 'mids' print(x, ...) # S3 method for class 'mira' print(x, ...) # S3 method for class 'mice.anova' print(x, ...) # S3 method for class 'mice.anova.summary' print(x, ...)"},{"path":"https://amices.org/mice/reference/print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a mids object — print.mids","text":"x Object class mids, mira mipo ... parameters passed print.default()","code":""},{"path":"https://amices.org/mice/reference/print.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a mids object — print.mids","text":"NULL NULL NULL NULL","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/print.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a mads object — print.mads","title":"Print a mads object — print.mads","text":"Print mads object","code":""},{"path":"https://amices.org/mice/reference/print.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a mads object — print.mads","text":"","code":"# S3 method for class 'mads' print(x, ...)"},{"path":"https://amices.org/mice/reference/print.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a mads object — print.mads","text":"x Object class mads ... parameters passed print.default()","code":""},{"path":"https://amices.org/mice/reference/print.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print a mads object — print.mads","text":"NULL","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/quickpred.html","id":null,"dir":"Reference","previous_headings":"","what":"Quick selection of predictors from the data — quickpred","title":"Quick selection of predictors from the data — quickpred","text":"Selects predictors according simple statistics","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quick selection of predictors from the data — quickpred","text":"","code":"quickpred( data, mincor = 0.1, minpuc = 0, include = \"\", exclude = \"\", method = \"pearson\" )"},{"path":"https://amices.org/mice/reference/quickpred.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quick selection of predictors from the data — quickpred","text":"data Matrix data frame incomplete data. mincor scalar, numeric vector (size ncol(data)) numeric matrix (square, size ncol(data) specifying minimum threshold(s) absolute correlation data compared. minpuc scalar, vector (size ncol(data)) matrix (square, size ncol(data) specifying minimum threshold(s) proportion usable cases. include string vector strings containing one variable names names(data). Variables specified always included predictor. exclude string vector strings containing one variable names names(data). Variables specified always excluded predictor. method string specifying type correlation. Use 'pearson' (default), 'kendall' 'spearman'. Can abbreviated.","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quick selection of predictors from the data — quickpred","text":"square binary matrix size ncol(data).","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quick selection of predictors from the data — quickpred","text":"function creates predictor matrix using variable selection procedure described Van Buuren et al.~(1999, p.~687–688). function designed aid setting good imputation model data many variables. Basic workings: procedure calculates variable pair (.e. target-predictor pair) two correlations using available cases per pair. first correlation uses values target predictor directly. second correlation uses (binary) response indicator target values predictor. largest (absolute value) correlations exceeds mincor, predictor added imputation set. default value mincor 0.1. addition, procedure eliminates predictors whose proportion usable cases fails meet minimum specified minpuc. default value 0, predictors retained even usable case. Finally, procedure includes predictors named include argument (useful background variables like age sex) eliminates predictor named exclude argument. variable listed include exclude arguments, include argument takes precedence. Advanced topic: mincor minpuc typically specified scalars, vectors squares matrices appropriate size also work. element vector corresponds row predictor matrix, procedure can effectively differentiate different target variables. Setting high values can useful auxiliary, less important, variables. set predictor variables can remain relatively small. Using square matrix extends idea columns, one can also apply cellwise thresholds.","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Quick selection of predictors from the data — quickpred","text":"quickpred() uses data.matrix convert factors numbers internal codes. Especially unordered factors resulting quantification may make sense.","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quick selection of predictors from the data — quickpred","text":"van Buuren, S., Boshuizen, H.C., Knook, D.L. (1999) Multiple imputation missing blood pressure covariates survival analysis. Statistics Medicine, 18, 681–694. van Buuren, S. Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/quickpred.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Quick selection of predictors from the data — quickpred","text":"Stef van Buuren, Aug 2009","code":""},{"path":"https://amices.org/mice/reference/quickpred.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quick selection of predictors from the data — quickpred","text":"","code":"# default: include all predictors with absolute correlation over 0.1 quickpred(nhanes) #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 1 1 #> hyp 1 0 0 1 #> chl 1 1 1 0 # all predictors with absolute correlation over 0.4 quickpred(nhanes, mincor = 0.4) #> age bmi hyp chl #> age 0 0 0 0 #> bmi 0 0 0 0 #> hyp 1 0 0 1 #> chl 1 0 1 0 # include age and bmi, exclude chl quickpred(nhanes, mincor = 0.4, inc = c(\"age\", \"bmi\"), exc = \"chl\") #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 0 0 #> hyp 1 1 0 0 #> chl 1 1 1 0 # only include predictors with at least 30% usable cases quickpred(nhanes, minpuc = 0.3) #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 0 0 #> hyp 1 0 0 0 #> chl 1 1 1 0 # use low threshold for bmi, and high thresholds for hyp and chl pred <- quickpred(nhanes, mincor = c(0, 0.1, 0.5, 0.5)) pred #> age bmi hyp chl #> age 0 0 0 0 #> bmi 1 0 1 1 #> hyp 1 0 0 0 #> chl 1 0 0 0 # use it directly from mice imp <- mice(nhanes, pred = quickpred(nhanes, minpuc = 0.25, include = \"age\")) #> #> iter imp variable #> 1 1 bmi hyp chl #> 1 2 bmi hyp chl #> 1 3 bmi hyp chl #> 1 4 bmi hyp chl #> 1 5 bmi hyp chl #> 2 1 bmi hyp chl #> 2 2 bmi hyp chl #> 2 3 bmi hyp chl #> 2 4 bmi hyp chl #> 2 5 bmi hyp chl #> 3 1 bmi hyp chl #> 3 2 bmi hyp chl #> 3 3 bmi hyp chl #> 3 4 bmi hyp chl #> 3 5 bmi hyp chl #> 4 1 bmi hyp chl #> 4 2 bmi hyp chl #> 4 3 bmi hyp chl #> 4 4 bmi hyp chl #> 4 5 bmi hyp chl #> 5 1 bmi hyp chl #> 5 2 bmi hyp chl #> 5 3 bmi hyp chl #> 5 4 bmi hyp chl #> 5 5 bmi hyp chl"},{"path":"https://amices.org/mice/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. dplyr filter generics glance, tidy","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":null,"dir":"Reference","previous_headings":"","what":"Self-reported and measured BMI — selfreport","title":"Self-reported and measured BMI — selfreport","text":"Dataset containing height weight data (measured, self-reported) two studies.","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Self-reported and measured BMI — selfreport","text":"data frame 2060 rows 15 variables: src Study, either krul mgg (factor) id Person identification number pop Population, NL (factor) age Age respondent years sex Sex respondent (factor) hm Height measured (cm) wm Weight measured (kg) hr Height reported (cm) wr Weight reported (kg) prg Pregnancy (factor), pregnant edu Educational level (factor) etn Ethnicity (factor) web Obtained web survey (factor) bm BMI measured (kg/m2) br BMI reported (kg/m2)","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Self-reported and measured BMI — selfreport","text":"Krul, ., Daanen, H. . M., Choi, H. (2010). Self-reported measured weight, height body mass index (BMI) Italy, Netherlands North America. European Journal Public Health, 21(4), 414-419. Van Keulen, H.M.,, Chorus, .M.J., Verheijden, M.W. (2011). Monitor Convenant Gezond Gewicht Nulmeting (determinanten van) beweeg- en eetgedrag van kinderen (4-11 jaar), jongeren (12-17 jaar) en volwassenen (18+ jaar). TNO/LS 2011.016. Leiden: TNO. Van der Klauw, M., Van Keulen, H.M., Verheijden, M.W. (2011). Monitor Convenant Gezond Gewicht Beweeg- en eetgedrag van kinderen (4-11 jaar), jongeren (12-17 jaar) en volwassenen (18+ jaar) 2010 en 2011. TNO/LS 2011.055. Leiden: TNO. (Dutch) Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Self-reported and measured BMI — selfreport","text":"dataset combines two datasets: krul data (Krul, 2010) (1257 persons) mgg data (Van Keulen 2011; Van der Klauw 2011) (803 persons). krul dataset contains height weight (measures self-reported) 1257 Dutch adults, whereas mgg dataset contains self-reported height weight 803 Dutch adults. Section 7.3 Van Buuren (2012) shows missing measured data can imputed mgg data, corrected prevalence estimates can calculated.","code":""},{"path":"https://amices.org/mice/reference/selfreport.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Self-reported and measured BMI — selfreport","text":"","code":"md.pattern(selfreport[, c(\"age\", \"sex\", \"hm\", \"hr\", \"wm\", \"wr\")]) #> age sex hr wr hm wm #> 1257 1 1 1 1 1 1 0 #> 803 1 1 1 1 0 0 2 #> 0 0 0 0 803 803 1606 ### FIMD Section 7.3.5 Application bmi <- function(h, w) { return(w / (h / 100)^2) } init <- mice(selfreport, maxit = 0) #> Warning: Number of logged events: 2 meth <- init$meth meth[\"bm\"] <- \"~bmi(hm,wm)\" pred <- init$pred pred[, c(\"src\", \"id\", \"web\", \"bm\", \"br\")] <- 0 imp <- mice(selfreport, pred = pred, meth = meth, seed = 66573, maxit = 2, m = 1) #> #> iter imp variable #> 1 1 hm wm edu etn bm #> Error in bmi(hm, wm): could not find function \"bmi\" ## imp <- mice(selfreport, pred=pred, meth=meth, seed=66573, maxit=20, m=10) ### Like FIMD Figure 7.6 cd <- complete(imp, 1) #> Error: object 'imp' not found xy <- xy.coords(cd$bm, cd$br - cd$bm) #> Error: object 'cd' not found plot(xy, col = mdc(2), xlab = \"Measured BMI\", ylab = \"Reported - Measured BMI\", xlim = c(17, 45), ylim = c(-5, 5), type = \"n\", lwd = 0.7 ) #> Error: object 'xy' not found polygon(x = c(30, 20, 30), y = c(0, 10, 10), col = \"grey95\", border = NA) polygon(x = c(30, 40, 30), y = c(0, -10, -10), col = \"grey95\", border = NA) abline(0, 0, lty = 2, lwd = 0.7) idx <- cd$src == \"krul\" #> Error: object 'cd' not found xyc <- xy #> Error: object 'xy' not found xyc$x <- xy$x[idx] #> Error: object 'xy' not found xyc$y <- xy$y[idx] #> Error: object 'xy' not found xys <- xy #> Error: object 'xy' not found xys$x <- xy$x[!idx] #> Error: object 'xy' not found xys$y <- xy$y[!idx] #> Error: object 'xy' not found points(xyc, col = mdc(1), cex = 0.7) #> Error: object 'xyc' not found points(xys, col = mdc(2), cex = 0.7) #> Error: object 'xys' not found lines(lowess(xyc), col = mdc(4), lwd = 2) #> Error: object 'xyc' not found lines(lowess(xys), col = mdc(5), lwd = 2) #> Error: object 'xys' not found text(1:4, x = c(40, 28, 20, 32), y = c(4, 4, -4, -4), cex = 3) box(lwd = 1)"},{"path":"https://amices.org/mice/reference/squeeze.html","id":null,"dir":"Reference","previous_headings":"","what":"Squeeze the imputed values to be within specified boundaries. — squeeze","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"function replaces values x lower bounds[1] bounds[1], replaces values higher bounds[2] bounds[2].","code":""},{"path":"https://amices.org/mice/reference/squeeze.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"","code":"squeeze(x, bounds = c(min(x[r]), max(x[r])), r = rep.int(TRUE, length(x)))"},{"path":"https://amices.org/mice/reference/squeeze.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"x numerical vector values bounds numerical vector length 2 containing lower upper bounds. default, bounds minimum maximum values x. r logical vector length length(x) used select subset x calculating automatic bounds.","code":""},{"path":"https://amices.org/mice/reference/squeeze.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"vector length length(x).","code":""},{"path":"https://amices.org/mice/reference/squeeze.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Squeeze the imputed values to be within specified boundaries. — squeeze","text":"Stef van Buuren, 2011.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Stripplot of observed and imputed data — stripplot.mids","title":"Stripplot of observed and imputed data — stripplot.mids","text":"Plotting methods imputed data using lattice. stripplot produces one-dimensional scatterplots. function automatically separates observed imputed data. functions extend usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stripplot of observed and imputed data — stripplot.mids","text":"","code":"# S3 method for class 'mids' stripplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, theme = mice.theme(), allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), panel = lattice::lattice.getOption(\"panel.stripplot\"), default.prepanel = lattice::lattice.getOption(\"prepanel.default.stripplot\"), jitter.data = TRUE, horizontal = FALSE, ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stripplot of observed and imputed data — stripplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. convenience, stripplot() bwplot formula y~.imp may abbreviated y. applies single y, (yet) work y1+y2~.imp. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. panel See xyplot. default.prepanel See xyplot. jitter.data See panel.xyplot. horizontal See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stripplot of observed and imputed data — stripplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Stripplot of observed and imputed data — stripplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Stripplot of observed and imputed data — stripplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation.","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Stripplot of observed and imputed data — stripplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Stripplot of observed and imputed data — stripplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/stripplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stripplot of observed and imputed data — stripplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg ### stripplot, all numerical variables if (FALSE) { # \\dontrun{ stripplot(imp) } # } ### same, but with improved display if (FALSE) { # \\dontrun{ stripplot(imp, col = c(\"grey\", mdc(2)), pch = c(1, 20)) } # } ### distribution per imputation of height, weight and bmi ### labeled by their own missingness if (FALSE) { # \\dontrun{ stripplot(imp, hgt + wgt + bmi ~ .imp, cex = c(2, 4), pch = c(1, 20), jitter = FALSE, layout = c(3, 1) ) } # } ### same, but labeled with the missingness of wgt (just four cases) if (FALSE) { # \\dontrun{ stripplot(imp, hgt + wgt + bmi ~ .imp, na = wgt, cex = c(2, 4), pch = c(1, 20), jitter = FALSE, layout = c(3, 1) ) } # } ### distribution of age and height, labeled by missingness in height ### most height values are missing for those around ### the age of two years ### some additional missings occur in region WEST if (FALSE) { # \\dontrun{ stripplot(imp, age + hgt ~ .imp | reg, hgt, col = c(grDevices::hcl(0, 0, 40, 0.2), mdc(2)), pch = c(1, 20) ) } # } ### heavily jitted relation between two categorical variables ### labeled by missingness of gen ### aggregated over all imputed data sets if (FALSE) { # \\dontrun{ stripplot(imp, gen ~ phb, factor = 2, cex = c(8, 1), hor = TRUE) } # } ### circle fun stripplot(imp, gen ~ .imp, na = wgt, factor = 2, cex = c(8.6), hor = FALSE, outer = TRUE, scales = \"free\", pch = c(1, 19) )"},{"path":"https://amices.org/mice/reference/summary.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of a mira object — summary.mira","title":"Summary of a mira object — summary.mira","text":"Summary mira object Summary mids object Summary mads object Print mice.anova object","code":""},{"path":"https://amices.org/mice/reference/summary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of a mira object — summary.mira","text":"","code":"# S3 method for class 'mira' summary(object, type = c(\"tidy\", \"glance\", \"summary\"), ...) # S3 method for class 'mids' summary(object, ...) # S3 method for class 'mads' summary(object, ...) # S3 method for class 'mice.anova' summary(object, ...)"},{"path":"https://amices.org/mice/reference/summary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of a mira object — summary.mira","text":"object mira object type length-1 character vector indicating type summary. three choices: type = \"tidy\" return parameters estimates analyses data frame. type = \"glance\" return fit statistics analysis data frame. type = \"summary\" returns list length m analysis results. default \"tidy\". ... parameters passed print() summary()","code":""},{"path":"https://amices.org/mice/reference/summary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of a mira object — summary.mira","text":"NULL NULL NULL NULL","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":null,"dir":"Reference","previous_headings":"","what":"Supports semi-transparent foreground colors? — supports.transparent","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"function used mdc() find whether current device supports semi-transparent foreground colors.","code":""},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"","code":"supports.transparent()"},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"TRUE FALSE","code":""},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"function calls function dev.capabilities() package grDevices. function return FALSE status current device unknown.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/supports.transparent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Supports semi-transparent foreground colors? — supports.transparent","text":"","code":"supports.transparent() #> [1] TRUE"},{"path":"https://amices.org/mice/reference/tbc.html","id":null,"dir":"Reference","previous_headings":"","what":"Terneuzen birth cohort — tbc","title":"Terneuzen birth cohort — tbc","text":"Data subset Terneuzen Birth Cohort data child growth.","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Terneuzen birth cohort — tbc","text":"tbs data frame 3951 rows 11 columns: id Person number occ Occasion number nocc Number occasions first first record person? (TRUE/FALSE) typ Type data (observed) age Age (years) sex Sex 1=M, 2=F hgt.z Height Z-score wgt.z Weight Z-score bmi.z BMI Z-score ao Adult overweight (0=, 1=yes) tbc.target data frame 2612 rows 3 columns: id Person number ao Adult overweight (0=, 1=yes) bmi.z.jv BMI Z-score young adult (18-29 years)","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Terneuzen birth cohort — tbc","text":"De Kroon, M. L. ., Renders, C. M., Kuipers, E. C., van Wouwe, J. P., van Buuren, S., de Jonge, G. ., Hirasing, R. . (2008). Identifying metabolic syndrome without blood tests young adults - Terneuzen birth cohort. European Journal Public Health, 18(6), 656-660. De Kroon, M. L. ., Renders, C. M., Van Wouwe, J. P., Van Buuren, S., Hirasing, R. . (2010). Terneuzen birth cohort: BMI changes 2 6 years correlate strongest adult overweight. PLoS ONE, 5(2), e9155. De Kroon, M. L. . (2011). Terneuzen Birth Cohort. Detection Prevention Overweight Cardiometabolic Risk Infancy Onward. Dissertation, Vrije Universiteit, Amsterdam. https://research.vu.nl/en/publications/-terneuzen-birth-cohort-detection--prevention--overweight Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Terneuzen birth cohort — tbc","text":"tbc data set random subset persons much larger collection data Terneuzen Birth Cohort. total cohort comprises 2604 unique persons, whereas subset tbc covers 306 persons. tbc.target auxiliary data set containing two outcomes adult age. details, see De Kroon et al (2008, 2010, 2011). imputation methodology explained Chapter 9 Van Buuren (2012).","code":""},{"path":"https://amices.org/mice/reference/tbc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Terneuzen birth cohort — tbc","text":"","code":"data <- tbc md.pattern(data) #> id occ nocc first typ age sex wgt.z hgt.z bmi.z ao #> 1202 1 1 1 1 1 1 1 1 1 1 1 0 #> 1886 1 1 1 1 1 1 1 1 1 1 0 1 #> 331 1 1 1 1 1 1 1 1 0 0 1 2 #> 522 1 1 1 1 1 1 1 1 0 0 0 3 #> 3 1 1 1 1 1 1 1 0 1 0 1 2 #> 7 1 1 1 1 1 1 1 0 1 0 0 3 #> 0 0 0 0 0 0 0 10 853 863 2415 4141"},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy method to extract results from a `mipo` object — tidy.mipo","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"Tidy method extract results `mipo` object","code":""},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"","code":"# S3 method for class 'mipo' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"x object class mipo conf.int Logical. confidence intervals returned? conf.level Confidence level intervals. Defaults .95 ... extra arguments (used)","code":""},{"path":"https://amices.org/mice/reference/tidy.mipo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy method to extract results from a `mipo` object — tidy.mipo","text":"dataframe withh columns: term estimate ubar b t dfcom df riv lambda fmi p.value conf.low (called conf.int = TRUE) conf.high (called conf.int = TRUE)","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":null,"dir":"Reference","previous_headings":"","what":"Toenail data — toenail","title":"Toenail data — toenail","text":"toenail data come Multicenter study comparing two oral treatments toenail infection. Patients evaluated degree separation nail. Patients randomized two treatments followed seven visits - four first year yearly thereafter. patients treated prior first visit regarded baseline.","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Toenail data — toenail","text":"data frame 1908 observations following 5 variables: ID numeric vector giving ID patient outcome numeric vector giving response (0=none mild seperation, 1=moderate severe) treatment numeric vector giving treatment group month numeric vector giving time visit (exactly monthly intervals hence round numbers) visit numeric vector giving number visit","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Toenail data — toenail","text":"De Backer, M., De Vroey, C., Lesaffre, E., Scheys, ., De Keyser, P. (1998). Twelve weeks continuous oral therapy toenail onychomycosis caused dermatophytes: double-blind comparative trial terbinafine 250 mg/day versus itraconazole 200 mg/day. Journal American Academy Dermatology, 38, 57-63.","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Toenail data — toenail","text":"dataset copied DPpackage, scheduled discontinued CRAN August 2019.","code":""},{"path":"https://amices.org/mice/reference/toenail.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Toenail data — toenail","text":"Lesaffre, E. Spiessens, B. (2001). effect number quadrature points logistic random-effects model: example. Journal Royal Statistical Society, Series C, 50, 325-335. G. Fitzmaurice, N. Laird J. Ware (2004) Applied Longitudinal Analysis, Wiley Sons, New York, USA. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/toenail2.html","id":null,"dir":"Reference","previous_headings":"","what":"Toenail data — toenail2","title":"Toenail data — toenail2","text":"toenail data come Multicenter study comparing two oral treatments toenail infection. Patients evaluated degree separation nail. Patients randomized two treatments followed seven visits - four first year yearly thereafter. patients treated prior first visit regarded baseline.","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Toenail data — toenail2","text":"data frame 1908 observations following 5 variables: patientID numeric vector giving ID patient outcome factor 2 levels giving response treatment factor 2 levels giving treatment group time numeric vector giving time visit (exactly monthly intervals hence round numbers) visit integer giving number visit","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Toenail data — toenail2","text":"De Backer, M., De Vroey, C., Lesaffre, E., Scheys, ., De Keyser, P. (1998). Twelve weeks continuous oral therapy toenail onychomycosis caused dermatophytes: double-blind comparative trial terbinafine 250 mg/day versus itraconazole 200 mg/day. Journal American Academy Dermatology, 38, 57-63.","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Toenail data — toenail2","text":"Apart formatting, dataset identical toenail. formatting taken identical data(\"toenail\", package = \"HSAUR3\").","code":""},{"path":"https://amices.org/mice/reference/toenail2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Toenail data — toenail2","text":"Lesaffre, E. Spiessens, B. (2001). effect number quadrature points logistic random-effects model: example. Journal Royal Statistical Society, Series C, 50, 325-335. G. Fitzmaurice, N. Laird J. Ware (2004) Applied Longitudinal Analysis, Wiley Sons, New York, USA. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/version.html","id":null,"dir":"Reference","previous_headings":"","what":"Echoes the package version number — version","title":"Echoes the package version number — version","text":"Echoes package version number","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Echoes the package version number — version","text":"","code":"version(pkg = \"mice\")"},{"path":"https://amices.org/mice/reference/version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Echoes the package version number — version","text":"pkg character vector package name.","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Echoes the package version number — version","text":"character vector containing package name, version number installed directory.","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Echoes the package version number — version","text":"Stef van Buuren, Oct 2010","code":""},{"path":"https://amices.org/mice/reference/version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Echoes the package version number — version","text":"","code":"version() #> [1] \"mice 3.16.16 2024-10-16 /home/runner/work/_temp/Library\" version(\"base\") #> [1] \"base 4.4.2 /opt/R/4.4.2/lib/R/library\""},{"path":"https://amices.org/mice/reference/walking.html","id":null,"dir":"Reference","previous_headings":"","what":"Walking disability data — walking","title":"Walking disability data — walking","text":"Two items YA YB measuring walking disability samples , B E.","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Walking disability data — walking","text":"data frame 890 rows following 5 variables: sex Sex respondent (factor) age Age respondent YA Item administered samples E (factor) YB Item administered samples B E (factor) src Source: Sample , B E (factor)","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Walking disability data — walking","text":"Example dataset demonstrate imputation two items (YA YB). Item YA administered sample sample E, item YB administered sample B sample E, sample E acts bridge study. Imputation using bridge study better simple equating imputation independence. Item YA corresponds HAQ8 item, item YB corresponds GAR9 items Van Buuren et al (2005). Sample E (well sample B) Euridiss study (n=292), sample ERGOPLUS study (n=306). See Van Buuren (2018) section 9.4 details imputation methodology.","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Walking disability data — walking","text":"van Buuren, S., Eyres, S., Tennant, ., Hopman-Rock, M. (2005). Improving comparability existing data Response Conversion. Journal Official Statistics, 21(1), 53-72. Van Buuren, S. (2018). Flexible Imputation Missing Data. Second Edition. Chapman & Hall/CRC. Boca Raton, FL.","code":""},{"path":"https://amices.org/mice/reference/walking.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Walking disability data — walking","text":"","code":"md.pattern(walking) #> sex age src YA YB #> 290 1 1 1 1 1 0 #> 300 1 1 1 1 0 1 #> 294 1 1 1 0 1 1 #> 6 1 1 1 0 0 2 #> 0 0 0 300 306 606 micemill <- function(n) { for (i in 1:n) { imp <<- mice.mids(imp) # global assignment cors <- with(imp, cor(as.numeric(YA), as.numeric(YB), method = \"kendall\" )) tau <<- rbind(tau, getfit(cors, s = TRUE)) # global assignment } } plotit <- function() { matplot( x = 1:nrow(tau), y = tau, ylab = expression(paste(\"Kendall's \", tau)), xlab = \"Iteration\", type = \"l\", lwd = 1, lty = 1:10, col = \"black\" ) } tau <- NULL imp <- mice(walking, max = 0, m = 10, seed = 92786) pred <- imp$pred pred[, c(\"src\", \"age\", \"sex\")] <- 0 imp <- mice(walking, max = 0, m = 3, seed = 92786, pred = pred) micemill(5) #> #> iter imp variable #> 1 1 YA YB #> 1 2 YA YB #> 1 3 YA YB #> #> iter imp variable #> 2 1 YA YB #> 2 2 YA YB #> 2 3 YA YB #> #> iter imp variable #> 3 1 YA YB #> 3 2 YA YB #> 3 3 YA YB #> #> iter imp variable #> 4 1 YA YB #> 4 2 YA YB #> 4 3 YA YB #> #> iter imp variable #> 5 1 YA YB #> 5 2 YA YB #> 5 3 YA YB plotit() ### to get figure 9.8 van Buuren (2018) use m=10 and micemill(20)"},{"path":"https://amices.org/mice/reference/windspeed.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset of Irish wind speed data — windspeed","title":"Subset of Irish wind speed data — windspeed","text":"Subset Irish wind speed data","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Subset of Irish wind speed data — windspeed","text":"data frame 433 rows 6 columns containing daily average wind speeds within period 1961-1978 meteorological stations Republic Ireland. data random sample larger data set. RochePt Roche Point Rosslare Rosslare Shannon Shannon Dublin Dublin Clones Clones MalinHead Malin Head","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Subset of Irish wind speed data — windspeed","text":"original data set much larger analyzed detail Haslett Raftery (1989). Van Buuren et al (2006) used subset investigate influence extreme MAR mechanisms quality imputation.","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Subset of Irish wind speed data — windspeed","text":"Haslett, J. Raftery, . E. (1989). Space-time Modeling Long-memory Dependence: Assessing Ireland's Wind Power Resource (Discussion). Applied Statistics 38, 1-50. http://lib.stat.cmu.edu/datasets/wind.desc http://lib.stat.cmu.edu/datasets/wind.data van Buuren, S., Brand, J.P.L., Groothuis-Oudshoorn C.G.M., Rubin, D.B. (2006) Fully conditional specification multivariate imputation. Journal Statistical Computation Simulation, 76, 12, 1049–1064.","code":""},{"path":"https://amices.org/mice/reference/windspeed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset of Irish wind speed data — windspeed","text":"","code":"windspeed[1:3, ] #> RochePt Rosslare Shannon Dublin Clones MalinHead #> 1 4.92 7.29 3.67 3.71 2.71 7.83 #> 2 22.50 19.41 16.13 16.08 16.58 19.67 #> 3 7.54 9.29 11.00 1.71 9.71 15.37"},{"path":"https://amices.org/mice/reference/with.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate an expression in multiple imputed datasets — with.mids","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"Performs computation imputed datasets data.","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"","code":"# S3 method for class 'mids' with(data, expr, ...)"},{"path":"https://amices.org/mice/reference/with.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"data object type mids, stands 'multiply imputed data set', typically created call function mice(). expr expression evaluate imputed data set. Formula's containing dot (notation \"variables\") work. ... used","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"object S3 class mira","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"Version 3.11.10 changed tidy evaluation quosure. change affect code worked previous versions. turned latter statement true (#292). Version 3.12.2 reverts old () function.","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/with.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"Karin Oudshoorn, Stef van Buuren 2009, 2012, 2020","code":""},{"path":"https://amices.org/mice/reference/with.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate an expression in multiple imputed datasets — with.mids","text":"","code":"imp <- mice(nhanes2, m = 2, print = FALSE, seed = 14221) # descriptive statistics getfit(with(imp, table(hyp, age))) #> Component 1 : #> age #> hyp 20-39 40-59 60-99 #> no 12 4 3 #> yes 0 3 3 #> #> Component 2 : #> age #> hyp 20-39 40-59 60-99 #> no 11 4 4 #> yes 1 3 2 #> # model fitting and testing fit1 <- with(imp, lm(bmi ~ age + hyp + chl)) fit2 <- with(imp, glm(hyp ~ age + chl, family = binomial)) fit3 <- with(imp, anova(lm(bmi ~ age + chl)))"},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":null,"dir":"Reference","previous_headings":"","what":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"Plotting method investigate relation amputed data weighted sum scores. Based lattice. xyplot produces scatterplots. function plots variables weighted sum scores. function automatically separates amputed non-amputed data see relation amputation weighted sum scores.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"","code":"# S3 method for class 'mads' xyplot( x, data, which.pat = NULL, standardized = TRUE, layout = NULL, colors = mdc(1:2), ... )"},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"x mads object, typically created ampute. data string vector variable names needs plotted. default, variables plotted. .pat scalar vector indicating patterns need plotted. default, patterns plotted. standardized Logical. Whether scatterplots need created standardized data . Default TRUE. layout vector two values indicating scatterplots one pattern divided plot. example, c(2, 3) indicates scatterplots six variables need placed 3 rows 2 columns. several defaults different #variables. Note 9 variables, multiple plots created automatically. colors vector two RGB values defining colors non-amputed amputed data respectively. RGB values can obtained hcl. ... used, consistency generic","code":""},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"list containing scatterplots. Note new pattern always shown new plot.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"mads object contains information need make desired plots. Check mads-class vignette Multivariate Amputation using Ampute understand contents class object mads.","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/xyplot.mads.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scatterplot of amputed and non-amputed data against weighted sum scores — xyplot.mads","text":"Rianne Schouten, 2016","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":null,"dir":"Reference","previous_headings":"","what":"Scatterplot of observed and imputed data — xyplot.mids","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"Plotting methods imputed data using lattice. xyplot() produces conditional scatterplots. function automatically separates observed (blue) imputed (red) data. function extends usual features lattice.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"","code":"# S3 method for class 'mids' xyplot( x, data, na.groups = NULL, groups = NULL, as.table = TRUE, theme = mice.theme(), allow.multiple = TRUE, outer = TRUE, drop.unused.levels = lattice::lattice.getOption(\"drop.unused.levels\"), ..., subscripts = TRUE, subset = TRUE )"},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"x mids object, typically created mice() mice.mids(). data Formula selects data plotted. argument follows lattice rules formulas, describing primary variables (used per-panel display) optional conditioning variables (define subsets plotted different panels) used plot. formula evaluated complete data set long form. Legal variable names formula include names(x$data) plus two administrative factors .imp .id. Extended formula interface: primary variable terms (LHS y RHS x) may consist multiple terms separated ‘+’ sign, e.g., y1 + y2 ~ x | * b. formula taken mean user wants plot y1 ~ x | * b y2 ~ x | * b, y1 ~ x y2 ~ x separate panels. behavior differs standard lattice. combine terms type, .e. factors numerical variables. Mixing numerical categorical data occasionally produces odds labeling vertical axis. na.groups expression evaluating logical vector indicating two groups distinguished (e.g. using different colors) display. environment expression evaluated response indicator .na(x$data). default na.group = NULL contrasts observed missing data LHS y variable display, .e. groups created .na(y). expression y creates groups according .na(y). expression y1 & y2 creates groups .na(y1) & .na(y2), y1 | y2 creates groups .na(y1) | .na(y2), . groups usual groups arguments lattice. differs na.groups evaluates completed data data.frame(complete(x, \"long\", inc=TRUE)) (usual), whereas na.groups evaluates response indicator. See xyplot details. na.groups groups specified, na.groups takes precedence, groups ignored. .table See xyplot. theme named list containing graphical parameters. default function mice.theme produces short list default colors, line width, . extensive list may obtained trellis.par.get(). Global graphical parameters like col cex high-level calls still honored, first experiment global parameters. Many setting consists pair. example, mice.theme defines two symbol colors. first observed data, second imputed data. theme settings exist call, affect trellis graphical parameters. allow.multiple See xyplot. outer See xyplot. drop.unused.levels See xyplot. ... arguments, usually directly processed high-level functions documented , instead passed functions. subscripts See xyplot. subset See xyplot.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"high-level functions documented , well high-level Lattice functions, return object class \"trellis\". update method can used subsequently update components object, print method (usually called default) plot appropriate plotting device.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"argument na.groups may used specify (combinations ) missingness variables. argument groups can used specify groups based variable values . one may active time. specified, na.groups takes precedence groups. Use subset na.groups together plots parts data. example, select first imputed data set subset=.imp==1. Graphical parameters like col, pch cex can specified arguments list alter plotting symbols. length(col)==2, color specification define observed missing groups. col[1] color 'observed' data, col[2] color missing imputed data. convenient color choice col=mdc(1:2), transparent blue color observed data, transparent red color imputed data. good choice col=mdc(1:2), pch=20, cex=1.5. choices can set duration session running mice.theme().","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"first two arguments (x data) reversed compared standard Trellis syntax implemented lattice. reversal necessary order benefit automatic method dispatch. mice argument x always mids object, whereas lattice argument x always formula. mice argument data always formula object, whereas lattice argument data usually data frame. arguments identical interpretation.","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization R, Springer. van Buuren S Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation Chained Equations R. Journal Statistical Software, 45(3), 1-67. doi:10.18637/jss.v045.i03","code":""},{"path":[]},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"Stef van Buuren","code":""},{"path":"https://amices.org/mice/reference/xyplot.mids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scatterplot of observed and imputed data — xyplot.mids","text":"","code":"imp <- mice(boys, maxit = 1) #> #> iter imp variable #> 1 1 hgt wgt bmi hc gen phb tv reg #> 1 2 hgt wgt bmi hc gen phb tv reg #> 1 3 hgt wgt bmi hc gen phb tv reg #> 1 4 hgt wgt bmi hc gen phb tv reg #> 1 5 hgt wgt bmi hc gen phb tv reg # xyplot: scatterplot by imputation number # observe the erroneous outlying imputed values # (caused by imputing hgt from bmi) xyplot(imp, hgt ~ age | .imp, pch = c(1, 20), cex = c(1, 1.5)) # same, but label with missingness of wgt (four cases) xyplot(imp, hgt ~ age | .imp, na.group = wgt, pch = c(1, 20), cex = c(1, 1.5))"},{"path":"https://amices.org/mice/news/index.html","id":"mice-31616","dir":"Changelog","previous_headings":"","what":"mice 3.16.16","title":"mice 3.16.16","text":"Prevent .mids() filling imp object complete variables","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31615","dir":"Changelog","previous_headings":"","what":"mice 3.16.15","title":"mice 3.16.15","text":"Initialize single-variables blocks make.method() efficient way (resolves #672)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31614","dir":"Changelog","previous_headings":"","what":"mice 3.16.14","title":"mice 3.16.14","text":"Fixes bug initialization factor values","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31613","dir":"Changelog","previous_headings":"","what":"mice 3.16.13","title":"mice 3.16.13","text":"Adds support literanger package rf imputation twice fast ranger (#648). Thanks @stephematician contribution.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31612","dir":"Changelog","previous_headings":"","what":"mice 3.16.12","title":"mice 3.16.12","text":"Fixes installation problem Rprofile prints stdout Fedora, R version 4.1.3 (#646, #647). Thanks @brookslogan fix.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31611","dir":"Changelog","previous_headings":"","what":"mice 3.16.11","title":"mice 3.16.11","text":"Repairs lost braces documentation","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-31610","dir":"Changelog","previous_headings":"","what":"mice 3.16.10","title":"mice 3.16.10","text":"Adds support non-syntactic variables names backticks (#631)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3169","dir":"Changelog","previous_headings":"","what":"mice 3.16.9","title":"mice 3.16.9","text":"Fixes problem minpuc argument quickpred() (#634) Fixes coef() available S4 object using lavaan (#615, #616) Adds .github/dependabot.yml configuration automate daily check (#598) Update documentation tags roxygen2 7.3.1 requirements","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3168","dir":"Changelog","previous_headings":"","what":"mice 3.16.8","title":"mice 3.16.8","text":"Fixes problems zero predictors (#588)","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-7","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.7","text":"Solves problem package documentation link Simplifies NEWS.md formatting get correct version sequence CRAN -package NEWS","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-6","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.6","text":"Prepares deprecation blocks argument various places Removes need blocks initialize_chain() rbind(), formulas concatenated duplicate names found, also rename duplicated variables formulas new name","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-6","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.6","text":"Fixes bug filter.mids() incorrectly removed empty components imp object Fixes bug ibind() incorrectly used length(blocks) first dimension chainMean chainVar objects Corrects description visitSequence, chainMean chainVar components mids object","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.5","text":"Patches bug complete() auto-repeated imputed values cells imputed (occurred special case rbind(), first set rows imputed second ). Replaces internal variable type informative pred (currently active row predictorMatrix)","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-4","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.4","text":"Imputing categorical data predictive mean matching. Predictive mean matching (PMM) default method mice() imputing numerical variables, long possible impute factors. enhancement introduces better support work categorical variables PMM. former system translated factors integers ynum <- .integer(f). However, order integers ynum may sensible interpretation unordered factor. new system quantifies ynum yield better results higher R2R^2. method calculates canonical correlation y (dummy matrix) linear combination imputation model predictors x. algorithm replaces category y single number taken first canonical variate. step, imputation model fitted, predicted values model extracted function similarity measure matching step. method works ordered unordered factors. special precautions taken ensure monotonicity category numbers quantifications, method able preserve quadratic non-monotone relations predicted metric. may beneficial remove sparsely filled categories, new trim argument. use new technique specify mice(..., method = \"pmm\", ...). numerical categorical variables imputed PMM. Potential advantages : Simpler faster fitting generalised linear model, e.g., logistic regression proportional odds model; insensitive order categories; need solve problems perfect prediction; inherit good statistical properties predictive mean matching. Note still lack solid evidence claims. (#576). Contributed @stefvanbuuren","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-3","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.3","text":"New system-independent method pooling: version introduces new function pool.table() takes tidy table parameter estimates stemming m repeated analyses. input data must consist three columns (parameter name, estimate, standard error) specification degrees freedom model fitted complete data. pool.table() function outputs 14 pooled statistics tidy form. primary use pool.table() support parameter pooling techiques tidy() glance() methods, either within R outside R. pool.table() function also allows novel workflows 1) break apart traditional pool() function data-wrangling part parameters-reducing part, 2) necessarily depend classed R objects. (#574). Contributed @stefvanbuuren","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.3","text":"Fixes “large logo” problem. (#574). Contributed @hanneoberman","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-2","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.2","text":"Breaking change: complete(..., action = \"long\", ...) command puts columns named \".imp\" \".id\" last two positions long data (instead first two positions). way, columns imputed data positions original data, user-friendly easier work . Note existing code assumes variables \".imp\" \".id\" columns 1 2 need modified. advice modify code using variable names \".imp\" \".id\". want old behaviour, specify argument order = \"first\". (#569). Contributed @stefvanbuuren","code":""},{"path":[]},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-1","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.1","text":"Adds support dots argument ranger::ranger(...) mice.impute.rf() (#563). Contributed @edbonneville","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3160","dir":"Changelog","previous_headings":"","what":"mice 3.16.0","title":"mice 3.16.0","text":"CRAN release: 2023-06-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-16-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.16.0","text":"Expands futuremice() functionality allowing external packages user-written functions (#550). Contributed @thomvolker Adds GH issue templates bug_report, feature_request help_wanted (#560). Contributed @hanneoberman","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-16-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.16.0","text":"Removes documentation files rbind.mids() cbind.mids() conform CRAN policy Adds mitml glmnet imports test code conforms _R_CHECK_DEPENDS_ONLY=true flag R CMD check Initializes random number generator futuremice() .Random.seed yet. Updates GitHub actions package checking site building Preserves user settings predictorMatrix case F adding predictorMatrix argument make.predictorMatrix() Polishes mice.impute.mpmm() example code","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-16-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.16.0","text":"Adds proper support factors mice.impute.2lonly.pmm() (#555) Solves function naming problems S3 generic functions tidy(), update(), format() sum() -comments weeds example&test code silence R CMD check _R_CHECK_DEPENDS_ONLY=true Fixes small bug futuremice() throws error number cores specified, number available cores greater number imputations. Solves bug mice.impute.mpmm() changed column order data","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3150","dir":"Changelog","previous_headings":"","what":"mice 3.15.0","title":"mice 3.15.0","text":"CRAN release: 2022-11-19","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-15-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.15.0","text":"Adds function futuremice() support parallel imputation using future package (#504). Contributed @thomvolker, @gerkovink Adds multivariate predictive mean matching mice.impute.mpmm(). (#460). Contributed @Mingyang-Cai Adds convergence() convergence evaluation (#484). Contributed @hanneoberman Reverts internal seed behaviour back mice 3.13.10 (#515). #432 introduced new local seed response #426. However, various issues arose facility (#459, #492, #502, #505). version restores old behaviour using global .Random.seed. Contributed @gerkovink Adds custom.t argument pool() allows advanced user specify custom rule calculating total variance TT. Contributed @gerkovink Adds new argument exclude mice.impute.pmm() excludes user-specified vector values matching. Excluded values appear imputations. Since observed values imputed, user-specified values still used fit imputation model (#392, #519). Contributed @gerkovink","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-15-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.15.0","text":"Styles .R .Rmd files Makes post-processing assignment consistent lines 85/86 sampler.R (#511) Edit test broken R<4 (#501). Contributed @MichaelChirico Adds support models reporting contrasts rather terms (#498). Contributed @LukasWallrich Applies edits autocorrelation function (#491). Contributed @hanneoberman Changes p-value calculation robust alternative (#494). Contributed @AndrewLawrence Uses inherits() check class membership Adds decprecation notices parlmice() Adapt prop, patterns weights matrices pattern 1’s Adds warning patterns generated (#449, #317, #451) Adds warning order model terms D1() D2() (#420) Adds example code fit model train data apply test data mice() Adds example code synthetic data generation analysis make.() Adds testfile test-mice.impute.rf.R(#448)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-15-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.15.0","text":"Replaces .Random.seed reads .GlobalEnv get(\".Random.seed\", envir = globalenv(), mode = \"integer\", inherits = FALSE) Repairs capitalisation problems lastSeedValue variable name Solves x$lastSeedValue problem cbind.mids() (#502) Fixes problems ampute() Preserves stochastic nature mice() smarter random seed initialisation (#459) Repairs drop = FALSE buglet mice.impute.rf() (#447, #448) @str-amg reported new dependency withr package version 2.4.0 (published January 2021) higher. Versions withr 2.3.0 may give Error: object 'local_seed' exported 'namespace:withr'. Either update manually, install patched version mice 3.14.1 GitHub. (#445). NOTE: withr longer needed mice 3.15.0","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3140","dir":"Changelog","previous_headings":"","what":"mice 3.14.0","title":"mice 3.14.0","text":"CRAN release: 2021-11-24","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-14-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.14.0","text":"Adds four new univariate functions using lasso automatic variable selection. Contributed @EdoardoCostantini (#438). mice.impute.lasso.norm() lasso linear regression mice.impute.lasso.logreg() lasso logistic regression mice.impute.lasso.select.norm() lasso selector + linear regression mice.impute.lasso.select.logreg() lasso selector + logistic regression Adds Jamshidian && Jalal’s non-parametric MCAR test, mice::MCAR() associated plot method. Contributed @cjvanlissa (#423). Adds two new functions pool.syn() pool.scalar.syn() specialise pooling estimates synthetic data. \"reiter2003\" pooling rule assumes synthetic data created complete data. Thanks Thom Volker (#436). default, mice.impute.rf() now uses faster ranger package back-end instead randomForest package. want old behaviour specify rfPackage = \"randomForest\" argument mice(...) call. Contributed @prockenschaub (#431).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-14-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.14.0","text":"Avoids changing global .Random.seed (#426, #432) implementing withr::local_preserve_seed() withr::local_seed(). change provides stabler behavior complex scripts. change appear break reproducibility mice() run seed. Nevertheless, run reproducibility problem, install mice 3.13.12 . Improves imputation parabolic data mice.impute.quadratic(), adds parameter quad.outcome containing name outcome variable complete-data model. Contributed @Mingyang-Cai, @gerkovink (#408) Generalises pool() processes parameters gamlss sub-models. Thanks Marcio Augusto Diniz (#406, #405) Uses robust standard error estimate pooling pool() can extract robust.se object returned broom::tidy() (#310) Replaces URL jstatsoft DOI Update reference literature (#442) Informs user pool() take mids object (#433) Updates documentation post-processing functionality (#387) Adds Rcpp necessities Solves problem “last resort” initialisation factors (#410) Documents “flat-line behaviour” mice.impute.2l.lmer() indicate problem fitting imputation model (#385) Add reprex test (#326) Documents multivariate imputation methods support post parameter (#326)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-14-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.14.0","text":"Contains emergency solution install..demand() broke standard CRAN workflow. mice 3.14.0 call install..demand() anymore recommended packages. Also, install..demand() run anymore non-interactive mode. Repairs error mice:::barnard.rubin() function infinite dfcom. Thanks @huftis (#441). Solves problem Xi <- .matrix(...) mice.impute.2l.lmer() occurred cluster contains one observation (#384) Edits predictorMatrix monotone pattern visitSequence = \"monotone\" maxit = 1 (#316) Solves problem plot produced md.pattern() (#318, #323) Fixes intercept make.formulas() (#305, #324) Fixes seed using newdata mice.mids() (#313, #325) Solves problem row names element created rbind() (#319) Solves bug mnar imputation routine. Contributed Margarita Moreno Betancur.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3130","dir":"Changelog","previous_headings":"","what":"mice 3.13.0","title":"mice 3.13.0","text":"CRAN release: 2021-01-27","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-13-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.13.0","text":"Updated mids2spss() replaces foreign haven package. Contributed Gerko Vink (#291)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-13-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.13.0","text":"Repairs error tests\\testhat\\test-D1.R failed mitml 0.4-0 Reverts .mids() function old version change commit 4634094 broke downstream package metafor (#292) Solves glitch mice.impute.rf() finding candidate donors (#288, #289)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3120","dir":"Changelog","previous_headings":"","what":"mice 3.12.0","title":"mice 3.12.0","text":"CRAN release: 2020-11-14","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-12-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.12.0","text":"Much faster predictive mean matching. new matchindex C function makes predictive mean matching 50 600 times faster. speed pmm now par normal imputation (mice.impute.norm()) miceFast package, without compromising statistical quality imputations. Thanks Polkas https://github.com/Polkas/miceFast/issues/10 suggestions Alexander Robitzsch. See #236 details. New ignore argument mice(). argument logical vector nrow(data) elements indicating rows ignored creating imputation model. may use ignore argument split data training set (imputation model built) test set (influence imputation model estimates). argument based suggestion https://github.com/amices/mice/issues/32#issuecomment-355600365. See #32 background techniques. Crafted Patrick Rockenschaub New filter() function mids objects. New filter() method subsets mids object (multiply-imputed data set). method accepts logical vector length nrow(data), expression construct vector incomplete data. (#269). Crafted Patrick Rockenschaub. Breaking change: matcher algorithm pmm changed matchindex speed improvements. want old behavior, specify mice(..., use.matcher = TRUE).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-12-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.12.0","text":"Corrected installation problem related cpp11 package (#286) Simplifies .mids() calling eval_tidy() quosure. yet solve #265. Improve documentation pool() pool.scalar() (#142, #106, #190 others) Makes tidy.mipo flexible (#276) Solves problem nelsonaalen() gets tibble (#272) Add explanation NAs can appear imputed data (#267) Add warning quickpred() documentation (#268) Styles sources files styler Improves consistency code documentation Moves internally defined functions global namespace Solves bug internal sum.scores() Adds deprecated messages lm.mids(), glm.mids(), pool.compare() Removes .pmm.match() expandcov() Strips return() calls placed just end--function Remove trailing spaces Repairs bug routine finding printFlag value (#258) Update URL’s transfer organisation amices","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3110","dir":"Changelog","previous_headings":"","what":"mice 3.11.0","title":"mice 3.11.0","text":"CRAN release: 2020-08-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-11-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.11.0","text":"Cox model return df.residual, caused problematic behavior D1(), D2(), D3(), anova() pool(). mice now extracts relevant information parts objects returned survival::coxph(), solves long-standing issues integration Cox model (#246).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-11-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.11.0","text":"Adds missing Rccp dependency work tidyr 1.1.1 (#248). Addresses warnings: Non-file package-anchored link(s) documentation object. Updates ampute documentation (#251). Ask user permission installing package suggests.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-3100","dir":"Changelog","previous_headings":"","what":"mice 3.10.0","title":"mice 3.10.0","text":"CRAN release: 2020-07-13","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-10-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.10.0","text":"New functions tidy.mipo() glance.mipo() return standardized output conforms broom specifications. Kindly contributed Vincent Arel Bundock (#240).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-10-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.10.0","text":"Solves problem D3 testing script produced error CRAN (#244).","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-390","dir":"Changelog","previous_headings":"","what":"mice 3.9.0","title":"mice 3.9.0","text":"CRAN release: 2020-05-14","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-9-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.9.0","text":"D3() function mice gave incorrect results. version solves problem calculation D3-statistic. See #226 #228 details. documentation explains results mice::D3() mitml::testModels() may differ. pool() function now forgiving glance() function (#233) possible bypass remove.lindep() setting eps = 0 (#225)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"minor-changes-3-9-0","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mice 3.9.0","text":"Adds reference Leacy’s thesis Adds example plot.mids() documentation","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-380","dir":"Changelog","previous_headings":"","what":"mice 3.8.0","title":"mice 3.8.0","text":"CRAN release: 2020-02-21","code":""},{"path":"https://amices.org/mice/news/index.html","id":"major-changes-3-8-0","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mice 3.8.0","text":"version adds two new NARFCS methods imputing data Missing Random (MNAR) assumption. NARFCS generalised version -called δ\\delta-adjustment method. Margarita Moreno-Betancur Ian White kindly contributes functions mice.impute.mnar.norm() mice.impute.mnar.logreg(). functions aid performing sensitivity analysis investigate impact different MNAR assumptions conclusion study. alternative MNAR older mice.impute.ri() function. Installation mice faster. External packages needed imputation analyses now installed demand. number dependencies estimated rsconnect::appDepencies() decreased 132 83. name clash complete() function tidyr longer problem. now flexible pool() function integrates better broom broom.mixed packages.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"bug-fixes-3-8-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mice 3.8.0","text":"Deprecates pool.compare(). Use D1() instead (#220) Removes everything utils::globalVariables() Prevents name clashes tidyr defining complete.mids() S3 method tidyr::complete() generic (#212) Extends pool() function deal multiple sets parameters. Currently supported keywords : term (broom functions), component (broom.mixed functions) y.values (multinom() model) (#219) Adds new install..demand() function lighter installation Adds toenail2 remove dependency HSAUR3 Solves problem ampute extreme cases (#216) Solves problem pool mgcv::gam (#218) Adds .gitattributes consistent line endings","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-370","dir":"Changelog","previous_headings":"","what":"mice 3.7.0","title":"mice 3.7.0","text":"CRAN release: 2019-12-13 Solves bug made polr() always fail (#206) Aborts one columns data.frame (#208) Update mira-class documentation (#207) Remove links deprecated package CALIBERrfimpute Adds check partial missing level-2 data 2lonly.norm 2lonly.pmm Change calculation a2 elementwise division matrix observations Extend documentation 2lonly.norm 2lonly.pmm Repair return value 2lonly.pmm Imputation method 2lonly.mean now also works factors Replace deprecated imputationMethod argument examples method informative error message stopped pre-processing (#194) Updated URL’s DESCRIPTION Fix string matching check.predictorMatrix() (#191)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-360","dir":"Changelog","previous_headings":"","what":"mice 3.6.0","title":"mice 3.6.0","text":"CRAN release: 2019-07-10 Copy toenail data orphaned DPpackage package Remove DPpackage Suggests field DESCRIPTION Adds support rotated names md.pattern() (#170, #177)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-350","dir":"Changelog","previous_headings":"","what":"mice 3.5.0","title":"mice 3.5.0","text":"CRAN release: 2019-05-13 version error fixes Fixes bug sampler ignored imputed values variables outside active block (#175, @alexanderrobitzsch) Adds note documenation .mids() (#173) Removes superfluous warning process_mipo() (#92) Fixes error degrees freedom P-value calculation (#171)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-340","dir":"Changelog","previous_headings":"","what":"mice 3.4.0","title":"mice 3.4.0","text":"CRAN release: 2019-03-07 Add hex sticker mice package. Designed Jaden M. Walters. Specify R3.5.0 random generator order pass CRAN tests Remove test-fix.coef.R tests Adds rotate.names argument md.pattern() (#154, #160) Fix solve name-matching problem (#156, #149, #147) Fix removes pre-check existence mice.impute.xxx() mice::mice() works expected (#55) Solves bug crashed mids2spss(), thanks Edgar Schoreit (#149) Solves problem routing logic (#149) causing passive imputation done predictors specified. passive imputation correctly ignore specification predictorMatrix. Implements alternative solution #93 #96. Instead skipping imputation variables without predictors, mice 3.3.1 impute variables using intercept Adds routine contributed Simon Grund checks deprecated arguments #137 Improves nelsonaalen() function data variables time status already defined (#140), thanks matthieu-faron","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-330","dir":"Changelog","previous_headings":"","what":"mice 3.3.0","title":"mice 3.3.0","text":"CRAN release: 2018-07-27 Solves bug passive imputation (#130). Warning: bug may caused invalid imputations mice 3.0.0 - mice 3.2.0 passive imputation. Updates code broom 0.5.0 (#128) Solves problem mice.impute.2l.norm() (#129) Use explicit foreign function calls tests","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-320","dir":"Changelog","previous_headings":"","what":"mice 3.2.0","title":"mice 3.2.0","text":"CRAN release: 2018-07-24 Skip tests mice.impute.2l.norm() (#129) Skip tests D1() (#128) Solve problem md.pattern (#126) Evades warning rbind cbind (#114) Solves rbind problem method list (#113) efficient use parlmice (#109) Add dfcom argument pool() (#105, #110) Updates parlmice + bugfix (#107)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-310","dir":"Changelog","previous_headings":"","what":"mice 3.1.0","title":"mice 3.1.0","text":"CRAN release: 2018-06-20 New parallel functionality: parlmice (#104) Incorporate suggestion @JoergMBeyer flux (#102) Replace duplicate code estimice (#101) Better checking empty methods (#99) Remove problem parent.frame (#98) Set empty method complete data (#93) Add NEWS.md, index.Rmd online package documentation Track .R instead .r Patch issue updateLog (#8, @alexanderrobitzsch) Extend README Repair issue md.pattern (#90) Repair check m (#89)","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-300","dir":"Changelog","previous_headings":"","what":"mice 3.0.0","title":"mice 3.0.0","text":"CRAN release: 2018-05-25 Version 3.0 represents major update implements following features: blocks: main algorithm iterates blocks. block simply collection variables. common MICE algorithm block equivalent one variable, - course - default; blocks argument allows mixing univariate imputation method multivariate imputation methods. blocks feature bridges two seemingly disparate approaches, joint modeling fully conditional specification, one framework; : argument logical matrix size data specifies cells imputed. opens new analytic possibilities; Multivariate tests: new functions D1(), D2(), D3() anova() perform multivariate parameter tests repeated analysis multiply-imputed data; formulas: old form argument redesign now renamed formulas. provides alternative way specify imputation models exploits full power R’s native formula’s. Better integration tidyverse framework, especially packages dplyr, tibble broom; Improved numerical algorithms low-level imputation function. Better handling duplicate variables. Last least: brand new edition online version Flexible Imputation Missing Data. Second Edition.","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-2469","dir":"Changelog","previous_headings":"","what":"mice 2.46.9","title":"mice 2.46.9","text":"simplify code mids object mice (thanks stephematician) (#61) simplify code rbind.mids (thanks stephematician) (#59) repair bug pool.compare() handling factors (#60) fixed bug rbind.mids handling (#59) add new arguments .mids(), add () update contact info resolved problem cart accepting matrix (thanks Joerg Drechsler) Adds generalized pool() list models Switch 3-digit versioning Date: 2017-12-08","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-246","dir":"Changelog","previous_headings":"","what":"mice 2.46","title":"mice 2.46","text":"Allow capitals imputation methods Date: 2017-10-22","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-245","dir":"Changelog","previous_headings":"","what":"mice 2.45","title":"mice 2.45","text":"Reorganized vignettes land GitHUB pages Date: 2017-10-21","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-244","dir":"Changelog","previous_headings":"","what":"mice 2.44","title":"mice 2.44","text":"Code changes robustness, style efficiency (Bernie Gray) Date: 2017-10-18","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-243","dir":"Changelog","previous_headings":"","what":"mice 2.43","title":"mice 2.43","text":"Updates ampute function vignettes (Rianne Schouten) Date: 2017-07-20","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-242","dir":"Changelog","previous_headings":"","what":"mice 2.42","title":"mice 2.42","text":"Rename mice.impute.2l.sys mice.impute.2l.lmer Date: 2017-07-11","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-241","dir":"Changelog","previous_headings":"","what":"mice 2.41","title":"mice 2.41","text":"Add new feature: whereargument mice Add new wy argument imputation functions Add mice.impute.2l.sys(), author Shahab Jolani Update many simplifications code enhancements Fixed broken cbind() function Fixed Bug made pad element disappear mids object Date: 2017-07-10","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-240","dir":"Changelog","previous_headings":"","what":"mice 2.40","title":"mice 2.40","text":"Fixed integration lattice package Updates colors xyplot.mads Add support factors mice.impute.2lonly.pmm() Create robust version .mids() Update ampute() Rianne Schouten Fix timestamp problem rebuilding vignette using R 3.4.0. Date: 2017-07-07","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-234","dir":"Changelog","previous_headings":"","what":"mice 2.34","title":"mice 2.34","text":"Update roxygen 6.0.1 Stylistic changes mice function (thanks Ben Ogorek) Calls cbind.mids() replaced calls cbind() Date: 2017-04-24","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-231","dir":"Changelog","previous_headings":"","what":"mice 2.31","title":"mice 2.31","text":"Add link miceVignettes github (thanks Gerko Vink) Add package documentation Add README GitHub Add new ampute functions vignette (thanks Rianne Schouten) Rename ccn –> ncc, icn –> nic Change helpers cc(), ncc(), cci(), ic(), nic() ici() use S3 dispatch Change issues tracker Github - add BugReports URL #21 Fixed multinom MaxNWts type fix polyreg polr #9 Fix checking nested models pool.compare #12 Fix .mids names columns #11 Fix extension glmer models #5 Date: 2017-02-23","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-229","dir":"Changelog","previous_headings":"","what":"mice 2.29","title":"mice 2.29","text":"Add midastouch: predictive mean matching small samples (thanks Philip Gaffert, Florian Meinfelder) Date: 2016-10-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-228","dir":"Changelog","previous_headings":"","what":"mice 2.28","title":"mice 2.28","text":"Repaired dots problem rpart call Date: 2016-10-05","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-227","dir":"Changelog","previous_headings":"","what":"mice 2.27","title":"mice 2.27","text":"Add ridge 2l.norm() Remove .o files Date: 2016-07-27","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-225","dir":"Changelog","previous_headings":"","what":"mice 2.25","title":"mice 2.25","text":"CRAN release: 2015-11-09 Fix .mids() bug crashed miceadds::mice.1chain() Date: 2015-11-09","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-223","dir":"Changelog","previous_headings":"","what":"mice 2.23","title":"mice 2.23","text":"Update example code /doc Remove lots dependencies, general cleanup Fix impute.polyreg() bug bombed predictors (thanks Jan Graffelman) Fix .mids() bug gave incorrect mm (several users) Fix pool.compare() error lmer object (thanks Claudio Bustos) Fix error mice.impute.2l.norm() just one NA (thanks Jeroen Hoogland) Date: 2015-11-04","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-222","dir":"Changelog","previous_headings":"","what":"mice 2.22","title":"mice 2.22","text":"CRAN release: 2014-06-11 Add six times faster predictive mean matching pool.scalar() now can Barnard-Rubin adjustment pool() now handles class lmerMod lme4 package Added automatic bounds donors .pmm.match() safety Added donors argument mice.impute.pmm() increased visibility Changes default number trees mice.impute.rf() 100 10 (thanks Anoop Shah) long2mids() deprecated. Use .mids() instead Put lattice back DEPENDS find generic xyplot() friends Fix error 2lonly.pmm (thanks Alexander Robitzsch, Gerko Vink, Judith Godin) Fix number imputations .mids() (thanks Tommy Nyberg, Gerko Vink) Fix colors mdc() example mice.impute.quadratic() Fix error mice.impute.rf() just one NA (thanks Anoop Shah) Fix error summary.mipo() names(x$qbar) equals NULL (thanks Aiko Kuhn) Fix improper testing ncol() mice.impute.2lonly.mean() Date: 2014-06-11","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-221","dir":"Changelog","previous_headings":"","what":"mice 2.21","title":"mice 2.21","text":"CRAN release: 2014-02-05 FIXED: compilation problem match.cpp solaris CC Date: 02-05-2014 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-220","dir":"Changelog","previous_headings":"","what":"mice 2.20","title":"mice 2.20","text":"CRAN release: 2014-02-04 ADDED: experimental fastpmm() function using Rcpp FIXED: fixes mice.impute.cart() mice.impute.rf() (thanks Anoop Shah) Date: 02-02-2014 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-219","dir":"Changelog","previous_headings":"","what":"mice 2.19","title":"mice 2.19","text":"ADDED: mice.impute.rf() random forest imputation (thanks Lisa Doove) CHANGED: default number donors mice.impute.pmm() changed 3 5. Use mice(…, donors = 3) get old behavior. CHANGED: speedup .norm.draw() using crossprod() (thanks Alexander Robitzsch) CHANGED: speedup .imputation.level2() (thanks Alexander Robitzsch) FIXED: define MASS, nnet, lattice imports instead depends FIXED: proper handling rare case remove.lindep() removed predictors (thanks Jaap Brand) Date: 21-01-2014 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-218","dir":"Changelog","previous_headings":"","what":"mice 2.18","title":"mice 2.18","text":"CRAN release: 2013-08-01 ADDED: .mids() converting long format mids object (thanks Gerko Vink) FIXED: mice.impute.logreg.boot() now properly exported (thanks Suresh Pujar) FIXED: two bugs rbind.mids() (thanks Gerko Vink) Date: 31-07-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-217","dir":"Changelog","previous_headings":"","what":"mice 2.17","title":"mice 2.17","text":"CRAN release: 2013-05-12 ADDED: new form argument mice() specify imputation models using forms (contributed Ross Boylan) FIXED: .mids(), .mids(), .mira() .mipo() exported FIXED: eliminated errors documentation pool.scalar() FIXED: error mice.impute.ri() (thanks Shahab Jolani) Date: 10-05-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-216","dir":"Changelog","previous_headings":"","what":"mice 2.16","title":"mice 2.16","text":"CRAN release: 2013-04-27 ADDED: random indicator imputation mice.impute.ri() nonignorable models (thanks Shahab Jolani) ADDED: workhorse functions .norm.draw() .pmm.match() exported FIXED: bug 2.14 2.15 mice.impute.pmm() produced error factors FIXED: bug crashed R class variable incomplete (thanks Robert Long) FIXED: bug 2l.pan 2l.norm convert class factor integer (thanks Robert Long) FIXED: warning eliminated caused character variables (thanks Robert Long) Date: 27-04-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-215","dir":"Changelog","previous_headings":"","what":"mice 2.15","title":"mice 2.15","text":"CRAN release: 2013-04-03 CHANGED: complete reorganization documentation source files ADDED: source published GitHub.com ADDED: new imputation method mice.impute.cart() (thanks Lisa Doove) FIXED: calculation degrees freedom pool.compare() (thanks Lorenz Uhlmann) FIXED: error DESCRIPTION file (thanks Kurt Hornik) Date: 02-04-2013 SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-214","dir":"Changelog","previous_headings":"","what":"mice 2.14","title":"mice 2.14","text":"CRAN release: 2013-03-19 ADDED: mice.impute.2l.mean() imputing class means level 2 ADDED: sampler(): new checks degrees freedom per variable iteration 1 ADDED: function check.df() throw warning low degrees freedom FIXED: tolower() added “2l” test sampler() FIXED: conversion factors roles (multilevel) padModel() FIXED: family argument call glm() glm.mids() (thanks Nicholas Horton) FIXED: .norm.draw(): evading NaN imputed values setting df rchisq() minimum 1 FIXED: bug mice.df() prevented classic Rubin df calculation (thanks Jean-Batiste Pingaul) FIXED: bug fixed mice.impute.2l.norm() (thanks Robert Long) CHANGED: faster .pmm.match2() version 2.12 renamed default .pmm.match() Date: 11-03-2013 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-213","dir":"Changelog","previous_headings":"","what":"mice 2.13","title":"mice 2.13","text":"CRAN release: 2012-07-04 ADDED: new multilevel functions 2l.pan(), 2lonly.norm(), 2lonly.pmm() (contributed Alexander Robitzsch) ADDED: new quadratic imputation function: quadratic() (contributed Gerko Vink) ADDED: pmm2(), five times faster pmm() ADDED: new argument data.init mice() initialization (suggested Alexander Robitzsch) ADDED: mice() now accepts pmm method (ordered) factors ADDED: warning note 2l.norm() advises use type=2 predictors FIXED: bug chrashed plot.mids() one incomplete variable (thanks Dennis Prangle) FIXED: bug sample() .pmm.match() donor=1 (thanks Alexander Robitzsch) FIXED: bug sample() mice.impute.sample() FIXED: fixed ‘?data’ bug check.method() REMOVED: wp.twin(). Now available AGD package Date: 03-07-2012 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-212","dir":"Changelog","previous_headings":"","what":"mice 2.12","title":"mice 2.12","text":"CRAN release: 2012-03-25 UPDATE: version launch Flexible Imputation Missing Data (FIMD) ADDED: code fimd1.r-fim9.r inst/doc calculating solutions FIMD FIXED: robust version supports.transparent() (thanks Brian Ripley) ADDED: auxiliary functions ifdo(), long2mids(), appendbreak(), extractBS(), wp.twin() ADDED: getfit() function ADDED: datasets: tbc, potthoffroy, selfreport, walking, fdd, fdgs, pattern1-pattern4, mammalsleep FIXED: .mira() added namespace ADDED: functions flux(), fluxplot() fico() missing data patterns ADDED: function nelsonaalen() imputing survival data CHANGED: rm.whitespace() shortened FIXED: bug pool() crashed nonstandard behavior survreg() (thanks Erich Studerus) CHANGED: pool() streamlined, warnings incompatibility lengths coef() vcov() FIXED: mdc() bug ignored transparent=FALSE argument, now made visible FIXED: bug md.pattern() >32 variables (thanks Sascha Vieweg, Joshua Wiley) Date: 25-03-2012 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-211","dir":"Changelog","previous_headings":"","what":"mice 2.11","title":"mice 2.11","text":"CRAN release: 2011-11-22 UPDATE: definite reference JSS paper ADDED: rm.whitespace() string manipulation (thanks Gerko Vink) ADDED: function mids2mplus() export data Mplus (thanks Gerko Vink) CHANGED: plot.mids() changed trellis version ADDED: code used JSS-paper FIXED: bug check.method() (thanks Gerko Vink) Date: 21-11-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-210","dir":"Changelog","previous_headings":"","what":"mice 2.10","title":"mice 2.10","text":"CRAN release: 2011-09-15 FIXED: arguments dec sep mids2spss (thanks Nicole Haag) FIXED: bug keyword “monotone” mice() (thanks Alain D) Date: 14-09-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-29","dir":"Changelog","previous_headings":"","what":"mice 2.9","title":"mice 2.9","text":"CRAN release: 2011-09-01 FIXED: appropriate trimming ynames xnames Trellis plots FIXED: exported: spss2mids(), mice.impute.2L.norm() ADDED: mice.impute.norm.predict(), mice.impute.norm.boot(), mice.impute.logreg.boot() ADDED: supports.transparent() detect whether .Device can semi-transparent colors FIXED: stringr package now properly loaded ADDED: trellis version plot.mids() ADDED: automatic semi-transparancy detection mdc() FIXED: documentation mira class (thanks Sandro Tsang) Date: 31-08-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-28","dir":"Changelog","previous_headings":"","what":"mice 2.8","title":"mice 2.8","text":"CRAN release: 2011-03-26 FIXED: bug fixed find.collinear() bombed one variable left Date: 24-03-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-27","dir":"Changelog","previous_headings":"","what":"mice 2.7","title":"mice 2.7","text":"CRAN release: 2011-03-16 CHANGED: check.data(), remove.lindep(): fully missing variables imputed allow.na=TRUE (Alexander Robitzsch) FIXED: bug check.data(). Now checks collinearity predictors (Alexander Robitzsch) CHANGED: abbreviations arguments eliminated evade linux warnings Date: 16-03-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-26","dir":"Changelog","previous_headings":"","what":"mice 2.6","title":"mice 2.6","text":"CRAN release: 2011-03-04 ADDED: bwplot(), stripplot(), densityplot() xyplot() creating Trellis graphs ADDED: function mdc() mice.theme() graphical parameters ADDED: argument passing mice() lower-level functions (requested Juned Siddique) FIXED: erroneous rgamma() replaced rchisq() .norm.draw, lowers variance bit small n ADDED: .mids() extended handle expression objects FIXED: reporting bug summary.mipo() CHANGED: df calculation pool(), intervals may become slightly wider ADDED: internal functions mice.df() df.residual() FIXED: error rm calculation “likelihood” pool.compare() CHANGED: default ridge parameter changed Date: 03-03-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-25","dir":"Changelog","previous_headings":"","what":"mice 2.5","title":"mice 2.5","text":"CRAN release: 2011-01-06 ADDED: various stability enhancements code clean-ADDED: find.collinear() function CHANGED: automatic removal constant collinear variables ADDED: ridge parameter .norm.draw() .norm.fix() ADDED: mice.impute.polr() ordered factors FIXED: chainMean chainVar mice.mids() FIXED: iteration counter mice.mids sampler() ADDED: component ‘loggedEvents’ mids-object logging actions REMOVED: annoying warnings removed predictors ADDED: updateLog() function CHANGED: smarter handling model setup mice() CHANGED: .pmm.match() now draws three closest donors ADDED: mids2spss() shipping mids-object SPSS FIXED: change summary.mipo() work .mira() ADDED: function mice.impute.2L.norm.noint() ADDED: function .mira() FIXED: global assign() removed mice.impute.polyreg() FIXED: improved handling factors complete() FIXED: improved labeling nhanes2 data Date: 06-01-2011 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-24","dir":"Changelog","previous_headings":"","what":"mice 2.4","title":"mice 2.4","text":"CRAN release: 2010-10-18 ADDED: pool() now supports class ‘polr’ (Jean-Baptiste Pingault) FIXED: solved problem mice.impute.polyreg one variables named y x FIXED: remove.lindep: intercept prediction bug ADDED: version() function ADDED: cc(), cci() ccn() convenience functions Date: 17-10-2010 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-23","dir":"Changelog","previous_headings":"","what":"mice 2.3","title":"mice 2.3","text":"CRAN release: 2010-02-14 FIXED: check.method: logicals now treated binary variables (Emmanuel Charpentier) FIXED: complete: NULL imputation case now properly handled FIXED: mice.impute.pmm: now creates imputation variability univariate predictor FIXED: remove.lindep: returns ‘keep’ vector instead data Date: 14-02-2010 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-22","dir":"Changelog","previous_headings":"","what":"mice 2.2","title":"mice 2.2","text":"CRAN release: 2010-01-14 ADDED: pool() now supports class ‘multinom’ (Jean-Baptiste Pingault) FIXED: bug fixed check.data data consisting two columns (Rogier Donders, Thomas Koepsell) ADDED: new function remove.lindep() removes predictors (almost) linearly dependent FIXED: bug fixed pool() produced (innocent) warning message (Qi Zheng) Date: 13-01-2010 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-21","dir":"Changelog","previous_headings":"","what":"mice 2.1","title":"mice 2.1","text":"CRAN release: 2009-09-18 ADDED: pool() now also supports class ‘mer’ CHANGED: nlme lme4 now loaded needed (pool()) FIXED: bug fixed mice.impute.polyreg() one missing entry (Emmanuel Charpentier) FIXED: bug fixed plot.mids() one missing entry (Emmanuel Charpentier) CHANGED: NAMESPACE expanded allow easy access function code FIXED: mice() can now find mice.impute.xxx() functions .GlobalEnv Date: 14-09-2009 / SvB","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-20","dir":"Changelog","previous_headings":"","what":"mice 2.0","title":"mice 2.0","text":"CRAN release: 2009-08-27 Major upgrade JSS manuscript ADDED: new functions cbind.mids(), rbind.mids(), ibind() ADDED: new argument mice(): ‘post’ post-processing imputations ADDED: new functions: pool.scaler(), pool.compare(), pool.r.squared() ADDED: new data: boys, popmis, windspeed FIXED: function summary.mipo (object$df) command fixed REMOVED: data.frame..matrix replaced internal data.matrix function ADDED: new imputation method mice.impute.2l.norm() multilevel data CHANGED: pool now works class vcov() method ADDED: .mids() provides general complete-data analysis ADDED: type checking mice() ensure appropriate imputation methods ADDED: warning added mice() constant predictors ADDED: prevention perfect prediction mice.impute.logreg() mice.impute.polyreg() CHANGED: mice.impute.norm.improper() changed mice.impute.norm.nob() REMOVED: mice.impute.polyreg2() deleted ADDED: new ‘include’ argument complete() ADDED: support empty imputation method mice() ADDED: new function md.pairs() ADDED: support intercept imputation ADDED: new function quickpred() FIXED: plot.mids() bug fix number variables > 5 Date: 26-08-2009 / SvB, KO","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-121","dir":"Changelog","previous_headings":"","what":"mice 1.21","title":"mice 1.21","text":"CRAN release: 2009-03-17 FIXED: Stricter type checking logicals mice() evade warnings. CHANGED: Modernization help files. FIXED: padModel: treatment changed contr.treatment CHANGED: Functions check.visitSequence, check.predictorMatrix, check.imputationMethod now coded local mice() FIXED: existsFunction check.imputationMethod now works S-Plus R Date: 15/3/2009","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-116","dir":"Changelog","previous_headings":"","what":"mice 1.16","title":"mice 1.16","text":"CRAN release: 2009-02-19 FIXED: impution function impute.logreg used convergence criteria optimistic fitting GLM glm.fit. Thanks Ulrike Gromping. Date: 6/25/2007","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-115","dir":"Changelog","previous_headings":"","what":"mice 1.15","title":"mice 1.15","text":"CRAN release: 2007-01-09 FIXED: lm.mids glm.mids functions, parameters passed glm lm. Date: 01/09/2006","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-114","dir":"Changelog","previous_headings":"","what":"mice 1.14","title":"mice 1.14","text":"CRAN release: 2006-04-04 FIXED: Passive imputation works . (Roel de Jong) CHANGED: Random seed now left alone, UNLESS argument “seed” specified. means unless specify identical seed values, imputations dataset different multiple calls mice. (Roel de Jong) FIXED: (docs): Documentation “impute.mean” (Roel de Jong) FIXED: Function ‘summary.mids’ now works (Roel de Jong) FIXED: Imputation function ‘impute.polyreg’ ‘impute.lda’ now work R Date: 9/26/2005","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-113","dir":"Changelog","previous_headings":"","what":"mice 1.13","title":"mice 1.13","text":"Changed function checkImputationMethod Date: Feb 6, 2004","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-112","dir":"Changelog","previous_headings":"","what":"mice 1.12","title":"mice 1.12","text":"Maintainance, S-Plus 6.1 R 1.8 unicode Date: January 2004","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-11","dir":"Changelog","previous_headings":"","what":"mice 1.1","title":"mice 1.1","text":"R version (help Peter Malewski Frank Harrell) Date: Feb 2001","code":""},{"path":"https://amices.org/mice/news/index.html","id":"mice-10","dir":"Changelog","previous_headings":"","what":"mice 1.0","title":"mice 1.0","text":"Original S-PLUS release Date: June 14 2000","code":""}]