as_imputation: Create an imputation object

View source: R/impute.R

as_imputationR Documentation

Create an imputation object

Description

This function creates the object that is returned from impute(). Essentially it is a glorified wrapper around list() ensuring that the required elements have been set and that the class is added as expected.

Usage

as_imputation(imputations, data, method, references)

Arguments

imputations

A list of imputations_list's as created by imputation_df()

data

A longdata object as created by longDataConstructor()

method

A method object as created by method_condmean(), method_bayes() or method_approxbayes()

references

A named vector. Identifies the references to be used when generating the imputed values. Should be of the form c("Group" = "Reference", "Group" = "Reference").


rbmi documentation built on Nov. 24, 2023, 5:11 p.m.