10  Exporting Blimp Results and Datasets

Blimp returns results in fixed-width plain text. This is easy to read but requires work to format for a table in a paper.

The Blimp Estimates Formatter Shiny app can be used to format results. Simply paste in a table of estimates from the Blimp output file, and download them as a CSV.

You may also choose to export a number of imputed datasets that can be analyzed with frequentist methods. One reason you might need this is if you have sample weights and need to fit a survey model, which Blimp does not support (yet).

To export imputed datasets, you can save estimates from separate chains or from the same chain. In either case, you need to specify the number of imputations (NIMPS).

To run 20 chains with 1000 imputations each and save the final set of imputations in each, specify:

NIMPS: 20;
CHAINS: 20;
ITERATIONS: 20000;

(Recall that the number of imputations is split across chains.)

Or, to save every 1000th imputation from each chain for a total of 20 imputed datasets, specify:

NIMPS: 20;
THIN: 1000;

With the default of two chains, each one would have 10000 post-burn-in iterations and save imputations every 1000.

To save these imputations to disk, use the SAVE command and specify a format. Blimp offers three formats: separate files (SAVE: separate = imps*.txt, for Mplus), a single file without the original dataset (SAVE: stacked = imps.txt, for R or SAS), and a single file with the original dataset (SAVE: stacked0 = imps.txt, for Stata).

Blimp can also be run through R with the rblimp package. The rblimp() function returns a matrix of estimates in mod@estimates, which can then be wrangled as you would any other dataframe. It also returns a list of imputed datasets in mod@imputations. Learn more at https://github.com/blimp-stats/rblimp.