model_variable_missingness: Model Variable Missingness

Description Usage Arguments Value Examples

View source: R/model_variable_missingness.R

Description

This function models missingness within a binary variable using logistic regression, adjusted for a specified list of confounders (only categorical variables are supported). It returns a structured output that can be directly tabulated. P values from Wald and Likelihood tests are also returned. Odds ratios are computed and presented with their 95 intervals.

Usage

1
2
model_variable_missingness(df = NULL, var = NULL, confounders = NULL,
  confounder_names = NULL, conf_int_sep = ", ")

Arguments

df

A dataframe containing cleaned ETS data as produced by tbinenglanddataclean.

var

A character string indicating the name of the variable to explore missingness within.

confounders

A character vector containing the programmatic names of variables to use as confounders. All variables must be categorical.

confounder_names

A character vector containing presentation names of variables. If not supplied will default to confounders.

conf_int_sep

A character string indicating the separator to use for confidence intervals

Value

A dataframe containing data and model estimates for the specified variable and confounders.

Examples

1
2

seabbs/ETSMissing documentation built on Nov. 22, 2019, 5:08 p.m.