write.amelia | R Documentation |
Writes the imptuted datasets to file from a run of amelia
write.amelia(
obj,
separate = TRUE,
file.stem,
extension = NULL,
format = "csv",
impvar = "imp",
orig.data = TRUE,
...
)
obj |
an object of class "amelia"; typically output from the
function |
separate |
logical variable. If |
file.stem |
the leading part of the filename to save to
output The imputation number and |
extension |
the extension of the filename. This is simply what
follows |
format |
one of the following output formats: |
impvar |
the name of imputation number variable written to the
stacked dataset when |
orig.data |
logical variable indicating whether the original,
unimputed dataset should be included in the stacked dataset when
|
... |
further arguments for the |
write.amelia
writes the imputed datasets to a file or a set of files
using one of the following functions: write.csv
,
write.dta
, or write.table
. You can pass arguments to
these functions from write.amelia
.
When separate
is TRUE
, each imputed dataset is written
to its own file. If you were to set file.stem
to
"outdata"
and the extension
to ".csv"
, then the
resulting filename of the written files will be
outdata1.csv outdata2.csv outdata3.csv ...
and so on.
When separate
is FALSE
, the function adds a variable
called impvar
to each dataset which indicates the imputed
dataset to which the row belongs. Then, each of the datasets are
stacked together to create one dataset. If orig.data
is TRUE
,
then the original, unimputed dataset is included at the top of the
stack, with its imputation number set to 0.
write.csv
, write.table
, write.dta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.