Learn R Programming

scdhlm (version 0.7.3)

default_times: Calculate default initial treatment time and follow-up time.

Description

Calculate the default initial treatment time and follow-up time that are used to define and estimate the between-case standardized mean differences for multiple baseline designs and variations.

Usage

default_times(
  design,
  case,
  phase,
  session,
  cluster = NULL,
  series = NULL,
  treatment_name = NULL,
  data = NULL
)

Value

A list of time range, default initial treatment time, and default follow-up time.

Arguments

design

Character string to specify whether data comes from a treatment reversal ("TR"), multiple baseline across participants ("MBP"), replicated multiple baseline across behaviors ("RMBB"), or clustered multiple baseline across participants ("CMB").

case

vector of case indicators or name of a character or factor vector within data indicating unique cases.

phase

vector of treatment indicators or name of a character or factor vector within data indicating unique treatment phases.

session

vector of measurement occasions or name of numeric vector within data of measurement times.

cluster

(Optional) vector of cluster indicators or name of a character or factor vector within data indicating clusters.

series

(Optional) vector of series indicators or name of a character or factor vector within data indicating series.

treatment_name

(Optional) character string corresponding to the name of the treatment phase.

data

(Optional) dataset to use for analysis. Must be a data.frame.

Examples

Run this code
data(Laski)
default_times(design = "MBP", 
              case = case, phase = treatment, session = time, 
              data = Laski)

data(Thiemann2001)
default_times(design = "RMBB", 
              case = case, series = series, 
              phase = treatment, session = time, 
              data = Thiemann2001)

data(Bryant2018)
default_times(design = "CMB", 
              cluster = group, case = case, 
              phase = treatment, session = session, 
              data = Bryant2018)
              

Run the code above in your browser using DataLab