write.mitml: Write 'mitml' objects to file

Description Usage Arguments Value Author(s) See Also Examples

View source: R/write.mitml.R

Description

Saves objects of class mitml in R binary formats (similar to ?save).

Usage

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

Arguments

x

An object of class mitml as produced by panImpute or jomoImpute.

filename

Name of the destination file, specified with file extension (e.g., .R, .Rdata).

drop

Logical flag indicating if the parameters of the imputation model should be dropped to reduce file size. Default is FALSE.

Value

None (invisible NULL).

Author(s)

Simon Grund

See Also

panImpute, jomoImpute, read.mitml

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
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.Rdata")

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

## End(Not run)

mitml documentation built on Oct. 5, 2021, 5:07 p.m.