next up previous contents home.gif
Next: Data Input and Output Up: Program Overview Previous: Amelia for Windows   Contents

Amelia for Gauss

As only two commands are required to use $ {\mathfrak{A}melia}$, the program can be run interactively, or in batch mode as a regular Gauss program (other Gauss commands can be used at any point if desired). Each command may also be used with many optional globals and subcommands. A simple example of the use of the program is as follows:

new;                    @ initialize Gauss @
library amelia;         @ initialize Amelia @
_AMempri=3;             @ use ridge prior @
dbuf = amelia("wars");  @ impute and save m=5 imputed datasets @
In this section, we describe this very simple use of $ {\mathfrak{A}melia}$.

  1. At the start of every program, use new; library amelia; to initialize Gauss and $ {\mathfrak{A}melia}$.

  2. $ {\mathfrak{A}melia}$ comes with many global variables. Almost all can usually be left at their default values, in which case you do not need to do anything special. If you wish to change a default, make the assignment before the call to amelia. In the example above, _AMempri=3; instructs the program to use a ridge prior (see Section 7.1).

  3. The main procedure, dbuf=amelia("wars");, loads a Gauss-format file from disk called wars.dat (in which missing data are coded according to the Gauss missing data code, ``.''), creates 5 completed data sets, and saves them under the names wars1.dat,...,wars5.dat in the same directory as wars. ( $ {\mathfrak{A}melia}$ will save data in different formats based on global _AMtype; To learn how to get data into Gauss format, see Section 6.2.) In addition to the files on disk, the procedure outputs dbuf, which contains all necessary information to create further imputed datasets, to perform diagnostics on the algorithm used, and to replicate the imputation analysis. dbuf is a Gauss data buffer, a single entity that can be saved from Gauss in one file, but which can include many different strings, vectors, or matrices (see the Gauss command vput in the Gauss manual for more information). After running $ {\mathfrak{A}melia}$, it is a good idea to save dbuf on disk (with a Gauss command such as save dbuf;).


next up previous contents home.gif
Next: Data Input and Output Up: Program Overview Previous: Amelia for Windows   Contents
Gary King 2003-07-25