I have run mice
to create 50 imputed datasets. Now, I am trying to compute chi-square statistics for some of my variables.
It is possible to obtain individual estimates for each dataset:
list <- with(imp, chisq.test(var1, var2, correct = FALSE))
But the results cannot be pooled. It is possible to combine the results in miceadds
, but the function requires a vector of chi-square statistics.
How do I extract the relevant information from list$analyses[[i]]$statistic
? I assume lapply
would be appropriate, but I am not sure how to specify it for a list of lists.