R: Write 'mitml' objects to file

write.mitml {mitml} | R Documentation

## Write `mitml` objects to file

### Description

This function saves objects of class `mitml` in R binary formats (similar to `?save`).

### Usage

    write.mitml(x, filename, drop=FALSE)

### Arguments

`x` | An object of class `mitml` as produced by `panImpute` and `jomoImpute`.
`filename` | Name of the destination file, to be specified with file extension (e.g., `.R`, `.Rdata`).
`drop` | Logical flag indicating if the parameters of the imputation model should be dropped in favor for lower file size. Default is to `FALSE`.

### Value

None (invisible `NULL`).

### Author(s)

Simon Grund

### See Also

`panImpute`, `jomoImpute`, `read.mitml`

### Examples

    data(studentratings)

    fml <- ReadDis + SES ~ ReadAchiev + (1|ID)
    imp <- panImpute(studentratings, formula=fml, n.burn=1000, n.iter=100, m=5)

    # write full 'mitml' object (default)
    write.mitml(imp, filename="imputation.R")

    # drop parameters of the imputation model
    write.mitml(imp, filename="imputation.R", drop=TRUE)

[Package mitml version 0.3-5 Index]