Learn R Programming

mitml (version 0.4-5)

subset.mitml.list: Subset a list of imputed data sets

Description

Creates data subsets for a list of multiply imputed data sets.

Usage

# S3 method for mitml.list
subset(x, subset, select, ...)

Value

A list of imputed data sets with class mitml.list.

Arguments

x

A list of imputed data sets with class mitml.list as produced by mitmlComplete (or similar).

subset

An R expression by which to subset each data set.

select

An R expression by which to select columns.

...

Not used.

Author

Simon Grund

Details

This function can be used to create subsets and select variables for a list of multiply imputed data sets according to the R expressions given in the subset and select arguments. The function is based on the subset function for regular data sets and works in a similar manner. Note that subsetting is performed individually for each data set. For this reason, the cases included may differ across data sets if the variables used for subsetting contain different values.