Steve,

It sounds like you are writing:

>  output <- amelia(x, seed=2345)

Whereas, for your purposes, you want:

>  set.seed(2345)
>  output <- amelia(x)

There is no "seed" argument in the amelia function.  For example, compare the following code examples to see if this is what you wanted:

##
library(Amelia)

data<-data.frame( runif(50), rnorm(50) )
data[2:5,1]<-NA

out11<-amelia(data,m=5,seed=2345, iCanMakeUpAnyArgumentNameILike=TRUE)
out12<-amelia(data,m=5,seed=2345, iCanMakeUpAnyArgumentNameILike=TRUE)

print(identical(out11$imputations[[1]], out12$imputations[[1]]))

set.seed(2345)
out21<-amelia(data,m=5)
set.seed(2345)
out22<-amelia(data,m=5)

print(identical(out21$imputations[[1]], out22$imputations[[1]]))


best,
James
--
James Honaker, Senior Research Scientist
//// Institute for Quantitative Social Science, Harvard University

From: amelia-bounces@lists.gking.harvard.edu [amelia-bounces@lists.gking.harvard.edu] on behalf of Matt Blackwell [m.blackwell@rochester.edu]
Sent: Tuesday, June 11, 2013 11:04 AM
To: Stephen Martin
Cc: amelia@lists.gking.harvard.edu
Subject: Re: [amelia] error: chol(): failed to converge & reproducibility

Hi Steve, 

1) The number of iterations will vary from imputation to imputation within runs of amelia(). This is important because it means that you will get different imputed values across the "m" imputations. The seed should make the entire run of amelia() the same as the next run of amelia(). Thus, "Imputation 2" in one run should have the same imputed values as "Imputation 2" in the next run with the same seed. 

2) This is probably due to highly collinear variables in the dataset or a linear dependence in the data. You might check for a saturated set of dummy variables or linear transformations in the data and set those to "idvars". 

Hope that helps!

Cheers,
matt.

~~~~~~~~~~~
Matthew Blackwell
Assistant Professor of Political Science
University of Rochester


On Tue, Jun 11, 2013 at 10:59 AM, Stephen Martin <stephen.martin@york.ac.uk> wrote:
Hello,

I am using Amelia II and have a couple of queries.

(1) I would like to ensure the reproducibility of the imputations so I
include 'seed=2345' in the Amelia line command.  However, I notice
that, if I repeat the run with exactly the same line command, the
chain lengths differ at each imputation.  Will I be getting the same
imputations?

(2) At the end of an imputation (with no parameters significantly
changed since the last iteration), I sometimes get the message:

error: chol(): failed to converge

together with a little window headed 'Microsoft Visual C++ Runtime
library' and the message ' This application has requested the Runtime
to terminate it in an unusual way.  Please contact the application's
support team for more information.'

How should I interpret and respond to this?

Thanks.

Steve
--
Amelia mailing list served by HUIT
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
More info about Amelia: http://gking.harvard.edu/amelia
Amelia mailing list
Amelia@lists.gking.harvard.edu

To unsubscribe from this list or get other information:

https://lists.gking.harvard.edu/mailman/listinfo/amelia