Hi Albrecht,

For a large class of statistical models, you can use Zelig:

http://gking.harvard.edu/zelig/

Alternatively you can always use for loops on each imputed dataset, which are in a list called "a.out$imputations". Here is a quick example:

stat.holder <- rep(NA, times = 10)
se.holder <- rep(NA, times = 10)

for (i in 1:10) {
  stat.holder[i] <- my.stat(a.out$imputations[[i]])
  se.holder[i] <- my.se(a.out$imputations[[i]])
}

The "my.stat" and "my.se" functions are just the function that calculates your point estimates and standard errors on each imputed dataset. That is, those are the estimates you would have done without missing data.Then, you can just run the Rubin rules on those vectors instead of saving and reloading each data frame individually. 

Hope that helps. 

Cheers,
matt.

On Tue, Aug 9, 2011 at 11:50 AM, Albrecht Gradmann <Albrecht.Gradmann@ecologic.eu> wrote:
Hello,

is there an easy way to calculate the mean and standard deviation (Rubins Formula) for Amelia objects? Right now I do the following:

* create an "imputed matrix" using the following call
a.out <- amelia(merged, m=10, ts= "Year", cs ="GEO")

* output the individual imputations using the following:
write.amelia(obj=a.out, file.stem = "outdata")

* Reading in "outdata1.csv" to  "outdata10.csv" as individual dataframes

* Using the 10 dataframes as arguments to calculate the statistics

Is there any "more straightforward" way that you could suggest to achieve this?

With best regards
Albrecht



--
Albrecht Gradmann, Fellow

Ecologic Institute
Berlin - Brussels - Vienna - Washington DC
Pfalzburger Strasse 43/44 | 10717 Berlin | Germany Tel. +49 (30) 86880-170 | Fax +49 (30) 86880-100 http://www.ecologic.eu/ | http://www.ecologic-events.eu/

Ecologic Institute publishes a monthly newsletter. To subscribe, please register at: http://www.ecologic.eu/subscribe.htm

- - -
Ecologic Institut gemeinnuetzige GmbH GF/Director: R. Andreas Kraemer | AG Charlottenburg HRB 57947 | USt/VAT-IdNr. DE811963464
'Ecologic' is a Trade Mark (TM) of Ecologic Institut gemeinnuetzige GmbH, Berlin.
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
More info about Amelia: http://gking.harvard.edu/amelia