screenResponses: Screen data for nonsense answers

Description Usage Arguments Value Author(s) Examples

View source: R/RFunctions.R

Description

Experimental function, intended to flag nonsense responders in survey data.

Usage

1
2
screenResponses(data = NULL, keys.list = NULL,
  maxpercentidentical = 1, maxquestionnaires = 2)

Arguments

data

The dataset.

keys.list

A (named) list, with one entry for each questionnaire, containing a character vector with all items belonging to that questionnaire.

maxpercentidentical

Numeric. Maximum allowed percentage of consecutive identical answers within a questionnaire.

maxquestionnaires

Maximum number of questionnaires allowed to exceed maxpercentidentical.

Value

A list with elements "screen": A logical vector of length equal to the number of rows in data, identifying whether cases are valid according to the thresholds specified; "exceeded_by_person": a numeric vector, indicating for how many questionnaires each person exceeded maxpercentidentical; "exceeded_by_questionnaire": a numeric vector, indicating for each questionnaire how many persons exceeded maxpercentidentical.

Author(s)

Caspar J. van Lissa

Examples

1
# Makeme!

cjvanlissa/motley documentation built on Sept. 23, 2019, 7:39 p.m.