Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mids2mlwin

Export mids object to MLwiN


Description

Converts a mids object into a format recognized by the multilevel software MLwiN.

Usage

mids2mlwin(imp, file.prefix, path=getwd(), sep=" ", dec=".", silent=FALSE,
   X=NULL)

Arguments

imp

The imp argument is an object of class mids, typically produced by the mice() function.

file.prefix

A character string describing the prefix of the output data files.

path

A character string containing the path of the output file. By default, files are written to the current R working directory.

sep

The separator between the data fields.

dec

The decimal separator for numerical data.

silent

A logical flag stating whether the names of the files should be printed.

X

Optional data frame of variables to be included in imputed datasets.

Value

The return value is NULL.

Author(s)

Thorsten Henke

Examples

## Not run: 
# imputation nhanes data
data(nhanes)
imp <- mice::mice(nhanes)
# write files to MLwiN
mids2mlwin(imp, file.prefix="nhanes" )

## End(Not run)

miceadds

Some Additional Multiple Imputation Functions, Especially for 'mice'

v3.11-6
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>), Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>), Thorsten Henke [ctb]
Initial release
2021-01-21 11:48:47

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.