def_complete: Complete a dataset after 'mice' has been run.

Description Usage Arguments Details Value Author(s)

View source: R/general_purpose.R

Description

Utility to define a non-repeated dataset after a missing imputation algorithm with the function mice has been run and the associated complete procedure through complete has been carried out.

Usage

1
def_complete(data, data_key)

Arguments

data

A data.table or a data.frame (see 'Details').

data_key

The keying variable in the data.table.

Details

The function acts on numeric variables only and takes a column mean by considering all the simulations detected given by .imp. This should ensure consistent results as given by pool When a data.frame is passed, def_complete internally converts it to a data.table but still returns a data.frame.

Value

Either a data.table or a data.frame.

Author(s)

Francesco Grossetti francesco.grossetti@gmail.com.


contefranz/statutils documentation built on May 13, 2019, 10:50 p.m.