Skip to contents

Declare the periods a unit spends in and out of sample over its whole life. The rotation is the design input that design_overlap() turns into a lag profile and design_schedule() turns into a field manifest, and it is the only place a pattern is parsed.

Usage

design_rotation(x)

Arguments

x

The rotation, in one of three forms.

A compact string in either of the two notations the literature uses, told apart by whether it contains a 0. Without one it names the spells in order, starting in sample: "4-8-4" is the CPS pattern, four periods in, eight out, four in, and "5" is a five-period panel with no break. The count of spells must be odd, so the life starts and ends in sample. With a 0 it is one flag per period: "1-1-0-0-1-1" is in for two, out for two, in for two, the same life as "2-2-2". A string of all 1s is the one form both notations claim and is refused, naming the two readings and the unambiguous spelling of each.

A numeric or logical vector gives one entry per period of a unit's life, 0/FALSE for out of sample. Positive values may differ, in which case they are the number of units still measured at that period of the life, which is how a design that subsamples later waves is described. No entry may exceed the first, a wave being able only to re-interview part of the cohort it recruited. The first and last entries must be positive, since an out-of-sample spell before the first or after the last interview is not part of a unit's life. A life shorter than two periods is refused, having no lag at which any sample is shared.

An existing svyplan_rotation, which is rebuilt from its takes so its fields are derived again rather than trusted.

Value

A svyplan_rotation object: a numeric vector of takes, one entry per period of a unit's life. It carries:

$spec

The input as given, so the printed form can name the pattern the way it was declared.

$life

Periods from a unit's first interview to its last.

$in_sample

Units in sample at any one period with the full sample in the field, which is the sum of the takes.

$unbroken

TRUE when no period of the life is out of sample.

$equal_take

TRUE when every in-sample period takes the same number of units as the first.

Details

A rotation is a finite life, not a cycle. Reading "4-8-4" as "four in, eight out, repeat forever" gives the wrong answer, and gives it quietly. Under the cycle only the cohort finishing its four-period stint leaves each period, so seven of eight are retained and the consecutive overlap comes out at 87.5 percent. Under the finite life two cohorts leave, one reaching the end of its first spell and one reaching the end of its second, so six of eight are retained and the answer is the published 75 percent. A compact string with an even number of spells would have to be read as a cycle and is rejected for that reason.

Two notations, and the one string that means both

Rotation designs are named two ways in print. "4-8-4" counts periods per spell, and "1-1-0-0-1-1" carries one flag per period. Both are accepted, told apart by the 0, which no spell can be. The exception is a string of all 1s, which is a valid sentence in both notations and a different design in each: "1-1-1" is three periods in sample as a pattern and one in, one out, one in as spells, whose consecutive overlaps are 2/3 and 0. Neither reading is given precedence, because the wrong one is invisible in the answer. Write "3" or "1-0-1", which each say one thing only.

One pattern, four views

CallQuestion it answersNeeds
design_rotation()What is one unit's life in the sample?the pattern
as.data.frame(), plot() on the rotationWhich panels are interviewed in each period, at which wave?the pattern and how the first panels enter
design_overlap()What share of the sample repeats at each lag?the pattern
design_schedule()What to select and interview, in what numbers?an n_panel() plan

The first three are design views, available before any sample size. The schedule's interviews carry the cell table's period, panel, rotation_group, wave, visit and life_stage, so the two agree on every interview. Each chart panel is one cohort, the units at the same wave at every period, and the schedule numbers its cohorts the same way. The overlap summarizes the cells. Under an equal take, once the full sample is in the field, the share of the panels in sample at one period that are in sample again a lag later is the overlap at that lag. The schedule is the same layout with sizes, rounding, subrounds and the field rules a sampling package needs.

References

U.S. Census Bureau and U.S. Bureau of Labor Statistics (2019). Current Population Survey: Design and Methodology. Technical Paper 77. The 4-8-4 rotation.

Lynn, P. (2012). Longitudinal Survey Methods for the Household Finances and Consumption Survey. Report prepared for the European Central Bank. The one-flag-per-period notation.

See also

plot.svyplan_rotation() for the rotation chart and print.svyplan_rotation() for its table of cells, design_overlap() for the overlap the rotation produces, and design_schedule() for the field manifest it produces.

Other repeated survey functions: design_overlap(), design_schedule(), n_change(), n_panel(), n_pooled(), prec_change(), prec_panel(), prec_pooled()

Examples

# The CPS rotation, declared once
cps <- design_rotation("4-8-4")
cps
#> Rotation pattern (planning)
#> 
#>   life: 16 periods, 8 in sample each period
#>   rotation: 4 in, 8 out, 4 in

# The overlap and the manifest both read the same object
design_overlap(cps)[1]
#> [1] 0.75
design_overlap(cps, max_lag = 12)[12]
#> [1] 0.5

# One flag per period, the other notation in use
design_rotation("1-1-0-0-1-1")
#> Rotation pattern (planning)
#> 
#>   life: 6 periods, 4 in sample each period
#>   rotation: 2 in, 2 out, 2 in

# A quarterly life of five interviews fielded monthly, written in full,
# since the shorthand "1-2(5)" is not read
design_rotation("1-2-1-2-1-2-1-2-1")
#> Rotation pattern (planning)
#> 
#>   life: 13 periods, 5 in sample each period
#>   rotation: 1 in, 2 out, 1 in, 2 out, 1 in, 2 out, 1 in, 2 out, 1 in

# A take that halves at later waves, laid out over six periods
as.data.frame(design_rotation(c(1, 1, 0.5, 0.5)), horizon = 6)
#>    period panel entry startup rotation_group wave visit life_stage take
#> 1       1     1     1   FALSE              1    1     1          1  1.0
#> 2       2     1     1   FALSE              1    2     2          2  1.0
#> 3       3     1     1   FALSE              1    3     3          3  0.5
#> 4       4     1     1   FALSE              1    4     4          4  0.5
#> 5       2     2     2   FALSE              2    1     1          1  1.0
#> 6       3     2     2   FALSE              2    2     2          2  1.0
#> 7       4     2     2   FALSE              2    3     3          3  0.5
#> 8       5     2     2   FALSE              2    4     4          4  0.5
#> 9       3     3     3   FALSE              3    1     1          1  1.0
#> 10      4     3     3   FALSE              3    2     2          2  1.0
#> 11      5     3     3   FALSE              3    3     3          3  0.5
#> 12      6     3     3   FALSE              3    4     4          4  0.5
#> 13      4     4     4   FALSE              4    1     1          1  1.0
#> 14      5     4     4   FALSE              4    2     2          2  1.0
#> 15      6     4     4   FALSE              4    3     3          3  0.5
#> 16      5     5     5   FALSE              1    1     1          1  1.0
#> 17      6     5     5   FALSE              1    2     2          2  1.0
#> 18      6     6     6   FALSE              2    1     1          1  1.0

# The rotation chart
plot(cps)