R/standard_stages.R
standard_stages.Rd
Identify the stages of a matrix population model that correspond to
different parts of the reproductive life cycle, namely propagule,
pre-reproductive, reproductive and post-reproductive. These classifications
are used to standardise matrices to allow comparisons across species with
different life cycle structures, see mpm_standardize
.
standard_stages(matF, repro_stages, matrix_stages)
The sexual component of a matrix population model (i.e., a square projection matrix reflecting transitions only due to sexual reproduction). It assumes that it has been rearranged so that non-reproductive stages are in the final rows/columns.
Logical vector identifying which stages are reproductive.
(character) vector of stages, values are prop
(propagule), active
, and dorm
(dormant).
A list with four elements:
Position of the propagule stages
Position of the pre-reproductive stages
Position of the reproductive stages
Position of the post-reproductive stages
Assumes that fecundity and mean fecundity matrices have been rearranged so that non-reproductive stages are in the final rows/columns. Output indicates groupings to be used when collapsing the matrix model.
Dormant stages are not currently handled.
Other transformation:
is_leslie_matrix()
,
leslie_collapse()
,
mpm_collapse()
,
mpm_rearrange()
,
mpm_split()
,
mpm_standardize()
,
name_stages()
,
repro_stages()
matU <- rbind(
c(0.1, 0, 0, 0, 0),
c(0.5, 0.2, 0.1, 0, 0),
c(0, 0.3, 0.3, 0.1, 0),
c(0, 0, 0.4, 0.4, 0.1),
c(0, 0, 0, 0.1, 0.4)
)
matF <- rbind(
c(0, 1.1, 0, 1.6, 0),
c(0, 0.8, 0, 0.4, 0),
c(0, 0, 0, 0, 0),
c(0, 0, 0, 0, 0),
c(0, 0, 0, 0, 0)
)
repro_stages <- c(FALSE, TRUE, FALSE, TRUE, FALSE)
matrix_stages <- c("prop", "active", "active", "active", "active")
r <- mpm_rearrange(matU, matF,
repro_stages = repro_stages,
matrix_stages = matrix_stages
)
standard_stages(r$matF, r$repro_stages, r$matrix_stages)
#> $propStages
#> [1] 1
#>
#> $preRepStages
#> [1] NA
#>
#> $repStages
#> [1] 2 3
#>
#> $postRepStages
#> [1] 4 5
#>