imp_varlist: Create list of information about variables to be imputed

View source: R/imp_varlist.R

imp_varlistR Documentation

Create list of information about variables to be imputed

Description

Create list of information about variables to be imputed

Usage

imp_varlist(vars, types, bounds = list(), waves = 0, year = NA)

Arguments

vars

Character vector of variable names.

types

Character vector of variable types. Can include "num" (numeric), "int" (interger), "ordinal", "nominal", "binary".

bounds

List of bounds, or NAs. For example, list(NA, NA, NA, c(0, Inf)) if there are four variables and the first three are unbounded and the fourth is non-negative.

waves

A numeric vector of survey wave numbers indicating waves to include in addition to baseline. The default 0 just includes baseline.

Value

A list containing info on the type of variable and any bounds. This information is later used when setting up the arguments to pass to the the Amelia package for imputation.


jgabry/RHhelpers documentation built on Feb. 22, 2024, 12:56 p.m.