merge.mids: Merge imputed dataset with original data.frame.

View source: R/merge.mids.R

merge.midsR Documentation

Merge imputed dataset with original data.frame.

Description

Returns a data.frame where the variables in the original (i.e. y parameter) are replaced by the imputed variables from mice (i.e. x parameter).

Usage

## S3 method for class 'mids'
merge(x, y, shadow.matrix = FALSE, shadow.suffix = "_missing", ...)

Arguments

x

the results from [mice::mice()].

y

the 'data.frame' passed to [mice::mice()]. This must have the same number rows, but may contain additional columns.

shadow.matrix

if TRUE, addtional columns will be added indicating whether the value was missing in the original data.frame.

shadow.suffix

the suffix used for the shadow matrix.

...

parameters passed to [mice::complete()].


jbryer/psa documentation built on Nov. 17, 2023, 8:21 a.m.