Builds the matrix that advances enrollment by one year. Progression ratios go
on the sub-diagonal, so each grade above the entry grade is fed by the grade
below it. The entry-grade row is zero because you supply entry enrollment to
project_enrollment() yourself. The ratios must form a single chain from the
lowest grade to the highest: each grade_to must be the grade directly above
its grade_from.
Arguments
- ratios
A data frame or data-frame subclass with columns
grade_from,grade_to, andratio, as returned byprogression_ratios().grade_fromandgrade_tomust not be missing.ratiomust be numeric, non-negative, and finite. An infinite ratio (from a feeder grade with zero enrollment) is an error.NA/NaNratios, for example from sparse history, stay in the matrix with a warning.- grade_order
Optional character vector giving the low-to-high grade order. If omitted, the order is rebuilt from the chain of transitions. Every grade in
grade_orderexcept the entry grade must appear as agrade_toinratios. It must not contain duplicates or missing values.
Examples
ratios <- data.frame(
grade_from = c("K", "1"),
grade_to = c("1", "2"),
ratio = c(0.92, 0.97)
)
progression_matrix(ratios)
#> K 1 2
#> K 0.00 0.00 0
#> 1 0.92 0.00 0
#> 2 0.00 0.97 0