Hi Stuart, 

Sorry, no, ameliabind is also designed like the combine.output I described: it combines multiple runs of Amelia in one output object of class "amelia". Hope that helps!

Cheers,
Matt

~~~~~~~~~~~
Matthew Blackwell
Associate Professor of Government
Harvard University


On Mon, Oct 12, 2020 at 10:13 PM Dr Stuart Reece <asreece@bigpond.net.au> wrote:

Thanks Matt.

Yes I have used the do.call(rbind   code many times.

 

But I thought ameliabind was to do.call(rbind   like dplyr’s bind_rows was to the do.call rbind….

ameliabind doesn’t work that way????

I could not find the syntax listed anywhere online… but I don’t mind using do.call..(rbind 

Thankyou so much,

Stuart.

 

 

 

 

From: Matt Blackwell [mailto:mblackwell@gov.harvard.edu]
Sent: Tuesday, 13 October 2020 11:56 AM
To: stuart.reece@bigpond.com
Cc: amelia@lists.gking.harvard.edu; Gary King; James Honaker; Stuart Reece
Subject: Re: Query on Amelia::combine.output()

 

Hi Stuart, 

 

Ah,  `combine.output()` actually just takes multiple Amelia runs that were done separately and combines them into one object, as if you didn't them all together. This is helpful if you want to run additional imputations after a first batch. Here is some code that will take Amelia output and create a stacked data frame of all imputations with a column for imputation numbers:

 

library(Amelia)
data(africa)
imps <- 5
a.out <- amelia(africa, cs = "country", ts = "year", m = imps)

stacked_df <- do.call(rbind, a.out$imputations)
stacked_df$imp_number <- rep(1:imps, each = nrow(africa))

 

Having said all of that, you probably don't want to do this. Instead, you probably want to apply your analysis model to each of the imputed data sets and then combine the coefficients/model parameters using the Rubin rules described in the various Amelia papers. 

 

Cheers,
Matt

 

~~~~~~~~~~~

Matthew Blackwell

Associate Professor of Government

Harvard University

 

 

On Fri, Oct 9, 2020 at 10:33 PM <stuart.reece@bigpond.com> wrote:

Hi Amelia Users.

 

I am running a Windows computer i9-9900K CPU 3.6GHz, 64MB RAM, 64-bit system.

 

I have the R Studio  1.3.1093 based on R 4.0.2, just re-installed today.

 

Amelia works on my data and runs models very nicely.  The parallel routines work really well, which I very much appreciate on my 16 CPU’s.

 

However I use complex geospatial models and would love to model the complete imputed geospatial data in R::splm.

 

So combining all the imputations into one df would be a fantastic assistance.

 

I think combine.output should do this very nicely.

 

I think the syntax for combine.output is probably like that of ameliabind – really simple….  Can’t find the syntax online….

 

But whenever I run combine.output – with whatever syntax – I always get the same error message which reads:

 

CombAmelia1616  <- Amelia::combine.output(a.r.CS.Raw.ETOPFA.LIR.02.16, a.r.CS.Raw.ETOPFA.LIR.02.16e)

Error: 'combine.output' is not an exported object from 'namespace:Amelia'

 

I was wondering please if something is wrong??

 

Also – could someone please confirm that the correct syntax for combine.output is the same as ameliabind – super simple????

 

Thanks so much,

 

Stuart Reece.