| fromseqimp {seqimpute} | R Documentation |
Transform an object of class seqimp into a dataframe or a mids
object
Description
The function converts a seqimp object into a specified format.
Usage
fromseqimp(data, format = "long", include = FALSE)
Arguments
data |
An object of class seqimp as created by the function seqimpute |
format |
The format in which the seqimp object should be returned. It
could be: |
include |
logical that indicates if the original dataset with missing
value should be included or not. This parameter does not apply
if |
Details
The argument format specifies the object that should be returned
by the function. It can take the following values
"long"-
produces a data set in which imputed data sets are stacked vertically. The following columns are added: 1)
.impreferring to the imputation number, and 2).idthe row names of the original dataset "stacked"-
the same as
"long", but without the inclusion of the two columns.impand.id "mids"-
produces an object of class
mids, which is the format used by themicepackage.
Value
Transform a seqimp object into the desired format.
Author(s)
Kevin Emery
Examples
## Not run:
# Imputation with the MICT algorithm
imp <- seqimpute(data = gameadd, var = 1:4)
# The object imp is transformed to a dataframe, where completed datasets are
# stacked vertically
imp.stacked <- fromseqimp(data = imp,
format = "stacked", include = FALSE)
## End(Not run)