impute_missing_score: Impute for Missing Values

View source: R/impute_missing_score.R

impute_missing_scoreR Documentation

Impute for Missing Values

Description

This function calculates imputed scores where item-level data is missing, and allows for the threshold of proportion of missing questions to be adjusted

Usage

impute_missing_score(
  .data,
  vars_to_impute,
  scale_name,
  missing_threshold = 0.2
)

Arguments

.data

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr).

vars_to_impute

vector of variables from which a score will be calculated/imputed

scale_name

output name of the scale being calculated

missing_threshold

maximum proportion of the scale questions allowed to be missing (i.e. the scale will not be calculated if the number of missing questions is greater than this value)

toggle_warning

NeuroShepherd/RankinLabTools documentation built on Sept. 23, 2022, 5:31 p.m.