Reputation: 1
My study aims to examine multiple parallel mediators between a predictor and an outcome variable. I've used mice
to run multiple imputations for the missing data. I would like to use the PROCESS
function in bruceR
package to conduct the multiple mediation.
Upon checking the relevant discussions, I understand that bruceR
is not incorporated into broom
so I received error messages after using the mice::pool
function.
I also understand that I can use pool.scalar()
function to extract the analysis myself. However, I can only find instructions for using pool.scalar()
for univariate analysis. Since my analysis involves multiple mediators (5 in total), can anyone please advise on the steps for multivariate analysis or direct me to the resources on this? I'm afraid I can't find the relevant guidance online...
Upvotes: 0
Views: 324
Reputation: 102
There's now a new function in mice
(v3.16.0) to pool estimates of analyses that are not recognized by the broom
workflow underlying the pool()
function. See the pool.table()
documentation on https://amices.org/mice/reference/pool.table.
# 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
# using pool.table() on tidy table
tbl <- summary(fit)[, c("term", "estimate", "std.error", "df.residual")]
tbl
pld2 <- pool.table(tbl, type = "minimal")
pld2
identical(pld1$pooled, pld2)
# conventional workflow: all numerical output
all1 <- summary(pld1, type = "all", conf.int = TRUE)
all1
# pool.table workflow: all numerical output
all2 <- pool.table(tbl)
all2
identical(data.frame(all1), all2)
Upvotes: 0