Skip to contents

Translate the launch and recruitment quantities in a rotating svyplan_panel into named cohort components, a dense panel-by-occasion schedule, and any interview commitments beyond the planning horizon. The result is a planning object: it does not inspect a frame, execute a sample, or construct analysis weights.

Usage

design_schedule(
  panel_plan,
  life,
  horizon,
  horizon_policy,
  refreshment,
  frame_vintage = NULL,
  rounding
)

Arguments

panel_plan

A rotating svyplan_panel from n_panel() or prec_panel() with start = "immediate" or start = "gradual".

life

An unbroken equal-take svyplan_overlap, such as design_overlap("4"). Its length must match the panel life.

horizon

A positive whole number of program occasions in the finite planning window.

horizon_policy

One of "continuing", "truncate_lives", or "close_intake". Under "continuing", interviews owed after horizon are returned separately in tail_commitments. "truncate_lives" cuts those interviews at the horizon. "close_intake" stops recruitment soon enough for every recruited cohort to finish by the horizon.

refreshment

Whether later cohorts are drawn from an "entrant_register" or a "whole_vintage". This records a frame role; it does not establish disjointness or combine weights.

frame_vintage

NULL, or a named character vector supplying frame identifiers for any subset of the generated cohort names. Unnamed or unknown entries are refused rather than matched by position.

rounding

The explicit operational rounding rule. The first schema supports "ceiling", applied to each startup panel and intake cohort before totals are formed. Operational counts are stored as whole-valued numerics so plans above R's 32-bit integer range remain representable.

Value

An svyplan_schedule list with scalar planning metadata and four data frames:

components

One row per execution: startup followed by the intake cohorts permitted by the horizon policy. Continuous and operational issue remain separate.

schedule

The dense component-panel grid over occasions 1 through horizon. Inactive rows have active = FALSE and life_stage = NA.

tail_commitments

A sparse table of interviews after horizon owed to components entering within a "continuing" window. It has a fixed empty schema under the other policies.

issue

The continuous and operational recruitment issued at each in-horizon occasion. as.data.frame() returns this view.

The generated activity is checked against panel_plan$launch_waves over every shared period that the horizon policy has not changed. Its realized issued overlap is also checked against life at every mature membership origin for which the destination occasion exists.

Examples

panel <- n_panel(
  n_prop(p = 0.5, moe = 0.03),
  retention = c(0.9, 0.9, 0.9),
  resp_rate = 0.75,
  design = "rotating",
  start = "immediate"
)
schedule <- design_schedule(
  panel,
  design_overlap("4"),
  horizon = 6,
  horizon_policy = "continuing",
  refreshment = "entrant_register",
  rounding = "ceiling"
)
schedule
#> Longitudinal design schedule (immediate launch, continuing)
#> life: 4 stages over 6 occasions, steady from occasion 4
#> rounding: ceiling at panel and cohort level
#> issue: 1656 at startup, 414 per occasion (occasions 2-6)
#> tail commitments: 6 panel-interviews after occasion 6
#> # summary() for the occasion-by-occasion profile and the overlap
schedule$components
#>     cohort entry_wave       frame_role planned_issue operational_issue panels
#> 1  startup          1          startup      1654.856              1656      4
#> 2 intake_2          2 entrant_register       413.714               414      1
#> 3 intake_3          3 entrant_register       413.714               414      1
#> 4 intake_4          4 entrant_register       413.714               414      1
#> 5 intake_5          5 entrant_register       413.714               414      1
#> 6 intake_6          6 entrant_register       413.714               414      1
#>   panel_issue frame_vintage  status
#> 1         414          <NA> planned
#> 2         414          <NA> planned
#> 3         414          <NA> planned
#> 4         414          <NA> planned
#> 5         414          <NA> planned
#> 6         414          <NA> planned