Previous: Replication Procedures Up: Replication Procedures Next: Replicating Analyses

Saving Replication Materials

Let mydata be your final data set, z.out be your zelig() output, and s.out your sim() output. To save all of this in one file, type:

> save(mydata, z.out, s.out, file = "replication.RData")
This creates the file replication.RData in your working directory. You may compress this file using zip or gzip tools.

If you have run several specifications, all of these estimates may be saved in one .RData file. Even if you only created quantities of interest from one of these models, you may still save all the specifications in one file. For example:

> save(mydata, z.out1, z.out2, s.out, file = "replication.RData")

Although the .RData format can contain data sets as well as output objects, it is not the most space-efficient way of saving large data sets. In an uncompressed format, ASCII text files take up less space than data in .RData format. (When compressed, text-formatted data is still smaller than .RData-formatted data.) Thus, if you have more than 100,000 observations, you may wish to save the data set separately from the Zelig output objects. To do this, use the write.table() command. For example, if mydata is a data frame in your workspace, use write.table(mydata, file = "mydata.tab") to save this as a tab-delimited ASCII text file. You may specify other delimiters as well; see help.zelig("write.table") for options.



Gary King 2011-11-29