Skip to contents

Determines the runs (segments) in z over which the value does not change, ignoring missing values. Used by interpolate_trajectory to split a patient's stage trajectory into per-stage segments.

Usage

find_stage_segments(z)

Arguments

z

A vector, typically of pubertal stages.

Value

A logical matrix with one row per segment and one column per element of z, where TRUE marks membership of that element in the segment.