IQSS / Zelig

A statistical framework that serves as a common interface to a large range of models
http://zeligproject.org
109 stars 43 forks source link

Add utility function for imputed datasets #178

Closed tercer closed 7 years ago

tercer commented 7 years ago

Allow users to easily use a sequence of imputed datasets. Previously there existed an intermediate function mi() that could construct an object that the zelig() function would then accept in place of a dataset.

Presently, objects coming from amelia() are accepted in place of data, and handled appropriately as sets of imputations. The goal here is to provide assistance more generally.

tercer commented 7 years ago

Utility function up here 2c7efa807dda48705ebdbff68dbf36a9642798b1

christophergandrud commented 7 years ago

Very nice. This looks pretty much ready to go. I'll see if I can write a reasonable test for it. Then should we commit it to master?

(The mode issue has also been bugging me. How important is keeping mode?)

christophergandrud commented 7 years ago

One thought: maybe rename the mi function to_zelig_mi.

Reasoning: mi could imply that the function imputes the data and may not clearly signal that the purpose of the function is specifically to prepare data for Zelig.

christophergandrud commented 7 years ago

I changed the name and added in some tests: b7784aa0e9c4142b770c03147ced6f980cf75f28

Any other changes before merging into master?

tercer commented 7 years ago

Looks ready to go. The use of mi was for backwards compatibility and brevity. It's a judgement call, but yours, not mine. (Could also make available a copy as mi<-to_zelig_mi.) Happy either way.

christophergandrud commented 7 years ago

I like the backwards mi idea. They both work now and are merged into master: d11adef4e23c57bac76b25131c4f202bcc0c0c70

Because of the other CRAN issue regarding maintainer names this is going up in 5.0-14.