non_overlapping_halves_split: Non overlapping halves split

View source: R/sign_consistency_utils.R

non_overlapping_halves_splitR Documentation

Non overlapping halves split

Description

The function returns a split of trials into two distinct (non-overlapping) halves randomly.

Usage

non_overlapping_halves_split(trial_selection)

Arguments

trial_selection

indicator vector of the same length as the number of trials in the relevant condition, with equal number of trials. The vector contains indicators for whether each trial is selected for group 0 (FALSE), or group 1 (TRUE).

Value

a list with two items:

  • grp0 - a vector of indicators for whether each trial belongs to to the first split.

  • grp1 - the complementary indicators vector to 'grp0'.


mufcItay/weaknull documentation built on Jan. 29, 2025, 7:28 p.m.