extract_imputed_df: Extract imputed dataset

View source: R/analyse.R

extract_imputed_dfR Documentation

Extract imputed dataset

Description

Takes an imputation object as generated by imputation_df() and uses this to extract a completed dataset from a longdata object as created by longDataConstructor(). Also applies a delta transformation if a data.frame is provided to the delta argument. See analyse() for details on the structure of this data.frame.

Subject IDs in the returned data.frame are scrambled i.e. are not the original values.

Usage

extract_imputed_df(imputation, ld, delta = NULL, idmap = FALSE)

Arguments

imputation

An imputation object as generated by imputation_df().

ld

A longdata object as generated by longDataConstructor().

delta

Either NULL or a data.frame. Is used to offset outcome values in the imputed dataset.

idmap

Logical. If TRUE an attribute called "idmap" is attached to the return object which contains a list that maps the old subject ids the new subject ids.

Value

A data.frame.


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