Thank you, James and Matt. It was very helpful.
On Thu, Nov 20, 2014 at 3:54 PM, Honaker, James <jhonaker(a)iq.harvard.edu>
wrote:
Yang,
There is an argument in the amelia() function, named p2s (from "print to
screen") that will increase or decrease the verbosity of the Amelia
output. Set "amelia( …., p2s=0)" for the lowest level of screen output.
If that is not sufficient, perhaps we can expand the range of the scale,
but also if you really needed, and this is a general R technique, you could
move the output off screen, by use of the sink() function. I find this
useful in settings where code is running on servers (like rApache) and
output can derail the job. For example, it might look like:
sink(file = "myfilename", type = "output") #Turn off output,
instead
write to file
output<- amelia(x, p2s=0)
sink() #Resume screen output
Best,
James
--
James Honaker, Senior Research Scientist
//// Institute for Quantitative Social Science, Harvard University
------------------------------
*From:* amelia-bounces(a)lists.gking.harvard.edu [
amelia-bounces(a)lists.gking.harvard.edu] on behalf of Yang Lu [
yang.lu2014(a)gmail.com]
*Sent:* Thursday, November 20, 2014 3:37 PM
*To:* amelia(a)lists.gking.harvard.edu
*Subject:* [amelia] Hide imputation progress
Hi,
Is there a way to hide the output on imputation iterations (such as
Imputation 1, 2 etc) in the package? It seems that the imputation counts
are hard-coded to print out the progress.
Thank you very much.
Yang
library(Amelia)
Loading required package:
foreign
Loading required package: RcppArmadillo
##
## Amelia II: Multiple Imputation
## (Version 1.7.2, built: 2013-04-03)
## Copyright (C) 2005-2014 James Honaker, Gary King and Matthew Blackwell
## Refer to
http://gking.harvard.edu/amelia/ for more information
##
data(freetrade)
a.out <- amelia(freetrade, m = 5, ts = "year", cs = "country")
-- Imputation 1 --
1 2 3 4 5 6 7 8 9 10
-- Imputation 2 --
1 2 3 4 5 6 7 8 9 10 11 12 13
-- Imputation 3 --
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
-- Imputation 4 --
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-- Imputation 5 --
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16