dot-calibration_create_randomised_groups: Create randomised groups Creates randomised groups, e.g. for...

.calibration_create_randomised_groupsR Documentation

Create randomised groups Creates randomised groups, e.g. for tests that depend on splitting (continuous) data into groups, such as the Hosmer-Lemeshow test

Description

The default fast mode is based on random sampling, whereas the slow mode is based on probabilistic joining of adjacent groups. As the name suggests, fast mode operates considerably more efficient.

Usage

.calibration_create_randomised_groups(
  x,
  y = NULL,
  sample_identifiers,
  n_max_groups = NULL,
  n_min_groups = NULL,
  n_min_y_in_group = NULL,
  unique_samples_only = TRUE,
  rstream_object = NULL
)

Arguments

x

Vector with data used for sorting. Groups are formed based on adjacent values.

y

Vector with markers, e.g. the events. Should be 0 or 1 (for an event).

sample_identifiers

data.table with sample_identifiers. If provide, a list of grouped sample_identifiers will be returned, and integers otherwise.

n_max_groups

Maximum number of groups that need to be formed.

n_min_groups

Minimum number of groups that need to be formed.

n_min_y_in_group

Minimum number of y=1 in each group for a valid group.

Details

Creates randomised groups, e.g. for tests that depend on splitting (continuous) data into groups, such as the Hosmer-Lemeshow test

Value

data.table with sample identifiers and random group ids.


familiar documentation built on May 23, 2026, 1:07 a.m.