Which workflow do you need? Answer one question at a time to reach the right recipe. The address bar follows along, so any step or recipe can be shared as a direct link.
The figures below use the notation of weasel's own pattern tables: a number is an observed wave (a row exists in the long data), a dot is a missed wave (the row is simply absent).
Wave-level missingness is row absence: waves 4 and 7 are not NA
rows, they simply do not exist in the data. NA values inside
observed rows are item nonresponse and never affect selection.
grid = "consecutive"grid = "observed" (biennial)
The span is the analysis window, lower:upper. The grid decides
which waves inside it count as scheduled: every integer
("consecutive") or only wave values that occur in the data
("observed"), so 2011 is never a missed wave in a biennial panel.
An interior gap is a run of missing waves strictly between a respondent's first and last observed wave. The top row misses both endpoints (▾) yet contains no gap; the bottom row keeps both endpoints and has exactly one gap of length 2.
require_endpoints max_missing = 1
n_gap_max = 1 max_gap_len = 1
The built-in anchored_balanced scenario applied to four
respondents observed in the span (the planning population). Retention is
always reported against that denominator, here 2 of 4.
grid = "observed" uses only waves that occur in the data (biennial panels, waves recorded as years)... 3 4 5 .. misses both endpoints yet has no interior gap.1 2 .. 5 6 7 has one gap of length 2; 1 . 3 . 5 . 7 has three gaps of length 1; late entry and early exit are not gaps.min_present, max_missing, n_gap_max, max_gap_len, require_endpoints; the same names work in the scope and in plan scenario tables.weasel_selectivity() helps you check, it does not decide.