Skip to contents

Useful when working with pipe operators.

Usage

select_phases(data, A, B, phase_names = "auto")

Arguments

data

A single-case data frame. See scdf() to learn about this format.

A

Selection of the A phase

B

Selection of the B phase

phase_names

A character vector with names for the resulting phases. The default "auto" generates phase names from the combination of the names of the recombined phases.

Value

An scdf with selected phases

Examples

exampleA1B1A2B2_zvt |>
  select_phases(A = c(1, 3), B = c(2, 4)) |>
  overlap()
#> Overlap Indices
#> 
#> Comparing phase 1 against phase 2 
#> 
#>                   Tick     Trick     Track
#> Design       A1A2-B1B2 A1A2-B1B2 A1A2-B1B2
#> PND                 17         0        17
#> PEM                 67        50        50
#> PET                 67        33        33
#> NAP                 68        51        58
#> NAP rescaled        36         3        17
#> PAND                67        50        67
#> IRD               0.33      0.33      0.17
#> Tau_U(A)          0.07     -0.16     -0.04
#> Tau_U(BA)         0.14      0.03     -0.03
#> Base_Tau          0.27     -0.25      0.13
#> Diff_mean         5.50      3.17      0.83
#> Diff_trend       -0.31     -1.10     -0.74
#> SMD               0.52      0.40      0.26
#> Hedges_g          0.56      0.50      0.26
#> 
#> The following variables were used in this analysis:
#> 'zvt' as dependent variable, 'part' as phase variable, and 'day' as measurement-time variable.