I have been working with an imputed data set using the MICE package (versions 2.2-3.3) in R (versions 3.3-3.5). I am now trying to add some variables to the imputed data set, which historically have worked fine using cbind.mids() (in this specific case, it is a Surv object variable from the Surv function). This does not, for some reason, work anymore. Although the mice package is loaded, the function cbind.mids() is not found.
Minimal example:
> library(mice)
Loading required package: lattice
Attaching package: ‘mice’
The following objects are masked from ‘package:base’:
cbind, rbind
> cbind.mids()
Error in cbind.mids() : could not find function "cbind.mids"
Note 1: ?cbind.mids still works and finds the help file. Using only cbind() from the mice package does not work either, It will merge my new variables to the mids object, but they do not work in subsequent analysis.
Note 2: I have tried reinstalling R, mice and Rstudio. I do not get any other error messages for guidance.
Does anyone know why it behaves like this? Is the cbind.mids() function for some reason removed or is it a problem with my system?
mice:::cbind.mids- Rich ScrivengetAnywhere(cbind.mids)returns "A single object matching ‘cbind.mids’ was found\n It was found in the following places\n namespace:mice", but it doesn't show up in the results from methods(cbind). I'm wondering if it wasn't registered properly. Sometimes authors make function names that have periods in them but they really are not part of an S3 group. Trymice:::cbind.mids- IRTFMcbind.midsis not supposed to be used directly. - Konrad Rudolph