drop_detect {dropout}R Documentation

Detecting Dropouts in Surveys

Description

drop_detect function detects participants who have dropped out of a survey. It identifies sequences of NA values up to the last survey question and pinpoints the column where the dropout occurred. It also provides the index of that column, enabling targeted analysis of dropout patterns.

Usage

drop_detect(data, last_col = NULL)

Arguments

data

A dataframe or tibble containing the survey data.

last_col

The index position or column name of the last survey item. This is optional and is used when there are additional columns in the data frame that are not part of the survey questions you are interested in.

Value

A dataframe or tibble where each row corresponds to a row in the original dataset. It contains three columns:

See Also

See vignette for detailed workflows and practical examples.

Examples

# Basic usage
drop_detect(flying, "location_census_region")


[Package dropout version 2.1.1 Index]