next up previous contents home.gif
Next: Reference Up: : A Program for Previous: Other Algorithms   Contents


How Long Does it Take?

Since the idea is to impute once and then run many analysis models on the same set of imputed data sets, the length of time it takes for imputation is not critical. EMis is a good deal faster than other multiple imputation methods, but it still is useful to understand how long the program will likely take when selecting variables. Table 2 provides some general guidelines for the time to completion for Amelia for either 5 (the default) or 10 imputations, with 500, 1000, or 2000 observations, each with 10, 20, 30, and 40 variables. The estimates are for a desktop computer with a 450Mhz processor and 128M memory. Faster or slower processors should scale accordingly, but if diminished memory requires Amelia to run in virtual memory, speed will be substantially reduced. The numbers in the table are approximate; data that violate model assumptions more tend to take longer to converge.

The speed of EMis can be greatly increased by using the provided dynamic library AMpatch.dll. This is precompiled code that calculates the loglikelihood function for the importance sampler (the ``is'' in EMis) at a much faster rate than possible in GAUSS. The global _AMpatch=1 tells Amelia to use the dynamic library; _AMpatch=0 (the default) uses our procedures written in GAUSS. Time savings can be immense, and our recommendation is to use the patch (_AMpatch=1) on all large datasets. In Amelia for Windows, the dynamic library is already installed when you install $ {\mathfrak{A}melia}$In Amelia for Gauss the dynamic library will need to be installed by copying the file AMpatch.dll to the directory ..\gauss\dlib or ..\gausswin\dlib where GAUSS is installed on your machine. If the directory \dlib does not already exist you should create it. On large datasets $ {\mathfrak{A}melia}$ can run ten times faster using the patch, as can be seen in table 2. The dynamic library works for any type of prior (see section 7.1), discrete and timeseries cross-sectional variables, but is not yet implemented with the conditional model for fully observed variables (see section 7.4).

Table 2: Timing EMis: Times to completion in s=seconds and m=minutes. Italicised times are using the dynamic library.
Number of Number of Draws   Variables
Imputations per Imputation Observations 10 20 30 40
(_AMnds) (_AMsn)          
5 10 500 7s 2.8m 31m 110m
    1000 10s 3.2m 34m 153m
    2000 18s 4.5m 37m 300m
5 10 500 3s 0.5m 3m  
    1000 6s 0.9m 4.5m  
    2000 14s 2.2m 9.5m  
10 10 500 12s 5.1m 59m 230m
    1000 16s 5.7m 62m 292m
    2000 25s 7.0m 72m 500m
10 10 500 4s 0.6m 3.5m  
    1000 9s 1.2m 5.5m  
    2000 17s 2.6m 12m  
5 50 500 24s 12m 144m  
    1000 29s 13m 147m  
    2000 37s 14m 153m  
5 50 500 5s 0.9m 4.5m  
    1000 9s 1.5m 7m  
    2000 18s 2.9m 14m  


See our FAQ in Section 11 for other options that can speed up the program.


next up previous contents home.gif
Next: Reference Up: : A Program for Previous: Other Algorithms   Contents
Gary King 2003-07-25