Skip to contents

Completes historical cohort-pair gaps and appends the triangular set of cohort comparisons available over a requested projection horizon.

Usage

extend_hsp_cohorts(original_hsp, n_proj = 13L, max_diff = 8L)

Arguments

original_hsp

A data.frame containing historical HSP cohort data with columns cohort1 and cohort2.

n_proj

An integer specifying the number of projection years to extend forward.

max_diff

An integer specifying the maximum cohort age difference to maintain between cohorts.

Value

A data frame of distinct, ordered cohort1/cohort2 pairs containing the historical and projected comparisons.

Details

original_hsp must be nonempty and contain finite cohort columns. n_proj and max_diff are expected to be nonnegative and positive whole numbers, respectively; these conditions are not fully validated by this low-level helper.