sample_plan: Generate a signal-contingent EMA sampling plan

Description Usage Arguments Value Examples

Description

Generate a signal-contingent EMA sampling plan

Usage

1
2
sample_plan(n_participants = 7, n_days = 2, times = c("08:00-10:00",
  "12:30", "17:00-19:00"), plot = FALSE)

Arguments

n_participants

number of participants in the study

n_days

study period

times

times (or time-periods) at which assessments are requested; a character vector with time elements (e.g., "11:00", "23:00"), with as many elements as n_beeps_per_day. Times can be specified as time points, ("11:15"), or as periods ("11:00-12:00"), in which case a random time point is chosen, per participant, in the designated period.

plot

if TRUE, the sample plan is plotted. Default is FALSE.

Value

a data.frame, containing the sample plan.

Examples

1
2
plan <- sample_plan(plot = TRUE)
head(plan)

jruwaard/emaph documentation built on May 3, 2019, 8:04 p.m.