I have a dataset that includes missing values, and I would like to carry out redundancy analysis using multiple imputation to fill in the missing values. So far, I have successfully created multiple imputations of the dataset using the mice package in R. I can then carry out redundancy analysis on each of those datasets separately, but how can I pool their results to create a single output? Ideally I would like to produce ordination scores in order to create a triplot, as well as pseudo-F values and p values for the marginal effects of my predictor variables.

The pool function within the package doesn’t have a method for .cca objects, and what I have read about “Rubin’s Rules” seems to apply to linear models and similar, I have not been able to make the link with the kind of output I see from the RDA.

Below is some example code that shows what I have managed so far and where I am stuck. It’s based on the example on the vegan::cca help page, with the addition of multiple imputation. It’s therefore heavily simplified compared to the full process I would follow with my data. For example, the mice() step gives a bunch of warnings, but please ignore them, they are not the focus of the question.

# Load up packages and example dataset

# Sprinkle some NA values into the data
dune.miss <- dune
for (i in 1:ncol(dune)) {
  dune.miss[,i] <- ifelse(runif(nrow(dune)) < 0.1, NA, dune[,i])

# Use MICE to impute missing values (5 imputations)
dune.imp <- mice(dune.miss)

# Select the first imputation and carry out RDA
dune.imp.1 <- complete(dune.imp, 1)
RDA <- rda(dune.imp.1 ~ Manure, dune.env)

# Examples of useful output
scores(RDA, choices = 1:2, scaling = 3, display = "bp")
anova.cca(RDA, by = "margin")

Clearly I could repeat the RDA step for each of the 5 imputations, but then how would I pool the above results to give a single output?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.