Learn R Programming

DCC (version 1.2.1)

detect_response_time: Detect implausibly fast or anomalous response times

Description

Flags respondents whose total response time is below an absolute minimum, or below a fraction of the median time. Each finding's evidence states which cut was triggered.

Usage

detect_response_time(x, time_var, min_seconds = NULL,
  min_median_ratio = 1/3, id_var = NULL, severity = "warn")

Value

A dcc_findings table (check id Q_RESPONSE_TIME).

Arguments

x

A dcc_data object or data.frame.

time_var

Name of the total response-time column (numeric, seconds).

min_seconds

Absolute minimum plausible total time, or NULL to skip the absolute check.

min_median_ratio

Flag times below this fraction of the median (default 1/3), or NULL to skip the relative check.

id_var

Name of the record-id column, or NULL for row numbers.

severity

Severity assigned to findings (default "warn").

Examples

Run this code
df <- data.frame(sid = c("S1", "S2", "S3"),
                 time_total = c(600, 45, 590))
detect_response_time(df, "time_total", min_seconds = 60, id_var = "sid")

Run the code above in your browser using DataLab