handle_missing_data: handle_missing_data

View source: R/data_preprocessing.R

handle_missing_dataR Documentation

handle_missing_data

Description

use col.index to determine which columns we want to "scan" for missing data. Note that in earlier points in the code, we rearrange the columns and prepare the data frame such that cols 1-4 are bookkeeping (unit id, time id, treated variable, unlagged outcome variable) and all remaining columns are used in the calculations after going through parse_and_prep function, so col.index should usually be 5:ncol(data). In practice, this function just looks over the data in the specified columns in the "data" data frame for missing data. Then it creates columns with indicator variables about the missingness of those variables: 1 for missing data, 0 for present

Usage

handle_missing_data(data, col.index)

Arguments

data

data.frame object.

col.index

numeric vector specifying which columns to inspect

Details

Tags missing data

Value

data.frame object with the data and the missingness indicators described above.


PanelMatch documentation built on June 22, 2024, 10:32 a.m.