random_halves_split: Random halves split

View source: R/sign_consistency_utils.R

random_halves_splitR Documentation

Random halves split

Description

The function returns two random (potentially overalpping) halves of the trials.

Usage

random_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.