Performs a computation of each of imputed datasets in data.
# S3 method for mids with(data, expr, ...)
data | An object of type |
---|---|
expr | An expression to evaluate for each imputed data set. Formula's containing a dot (notation for "all other variables") do not work. |
... | Not used |
An object of S3 class mira
Version 3.11.10 changed to tidy evaluation on a quosure. This change
should not affect any code that worked on previous versions.
It turned out that the latter statement was not true (#292).
Version 3.12.2 reverts to the old with()
function.
van Buuren S and Groothuis-Oudshoorn K (2011). mice
:
Multivariate Imputation by Chained Equations in R
. Journal of
Statistical Software, 45(3), 1-67.
https://www.jstatsoft.org/v45/i03/
Karin Oudshoorn, Stef van Buuren 2009, 2012, 2020
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 #>