IQSS / Amelia

Amelia: A Package for Missing Data
http://gking.harvard.edu/amelia
61 stars 17 forks source link

Data not found when using moList and parallel #15

Closed mattblackwell closed 6 years ago

mattblackwell commented 6 years ago

From a user email:

I am currently trying to use the overimputation feature of "Amelia" in conjunction with parallelized computation in the "snow" package. Unfortunately, my computations fail with error code 3 and message "The setting for the data argument doesn't exist." On the CRAN, you're listed as the maintainer, so I was hoping that you might be able to help me sort out my problem.

Some additional details: Following the examples in the documentation, I generate a "molist" with moPrep(), which I then pass to amelia(). When run without parallelization, this works perfectly fine, and amelia() returns the imputed data as expected. However, in parallel, amelia() appears unable to find the data set that is pointed to in the "molist" generated by moPrep(). There appears to be no difference between the "molist" I get when running with/without parallelization (i.e., both have a symbolic reference to the data in the $data slot). However, in parallel, amelia() can't find it, whereas it can when run without parallelization.

This is likely due to scoping issues with "eval" and parallel. We could try to specify the frame in the amelia.molist function.

mattblackwell commented 6 years ago

I believe we fixed this in 42a0eb2c61b80e2998499eb4935df64e7d645870