Skip to contents

Reports the response rate after an answered and after a skipped prompt (pooled over consecutive prompts, within day when day is given, and as the mean over persons of the person-specific rates) and the response rate by study quarter. Serial dependence in \(R\) is expected under M3, but some serial dependence also arises under M1, M2 and M4 through the autocorrelated states and the person propensities, so this is a descriptive check, not a test of M3 against the other motifs.

Usage

fatigue_check(data, id = "id", time = "time", day = NULL, R = "R")

Arguments

data

Long data frame with one row per scheduled prompt.

id, time

Names of the person and prompt-index columns.

day

Optional name of a day column; pairs are formed only within a day (the overnight gap is not a lag-1 transition).

R

Name of the response-indicator column (0/1, no NA); required, because the check has no state columns from which to infer it.

Value

An object of class "fatigue_check": a list with

after_answered and after_skipped (pooled response rates after an answered and after a skipped prompt), difference

(their difference, pooled), difference_person (mean of the person-specific differences), by_quarter (response rate by study quarter) and n_transitions. It has a print method.

Examples

sim <- simulate_ema(N = 40, n_prompts = 30, motifs = "M3", seed = 1)
fatigue_check(sim$data)
#> Fatigue check over 1160 consecutive prompts
#>   response rate after an answered prompt: 0.835; after a skipped prompt: 0.509; difference 0.326 (person-mean difference 0.246)
#>   response rate by study quarter: 0.722 0.786 0.759 0.736 
# compare with a mechanism without burden
fatigue_check(simulate_ema(N = 40, n_prompts = 30, motifs = "M0", seed = 1)$data)
#> Fatigue check over 1160 consecutive prompts
#>   response rate after an answered prompt: 0.760; after a skipped prompt: 0.729; difference 0.031 (person-mean difference -0.013)
#>   response rate by study quarter: 0.719 0.793 0.75 0.743