Create a birth process matrix for each year.

bbs_matrix_birth_year(
  fecundity,
  female_recruit_stage = 1,
  male_recruit_stage = NULL,
  proportion_female = 0.5
)

Arguments

fecundity

A matrix of the fecundity rates with dimensions year and stage.

female_recruit_stage

A positive whole number of the stage representing female recruits.

male_recruit_stage

A positive whole number of the stage representing male recruits. Ignored if NULL.

proportion_female

A number between 0 and 1 indicating the proportion of recruits that are female.

Value

An array of the birth process matrices with dimensions stage, stage, year.

Examples

fec <- bbs_fecundity(c(NA, 0.7), nyear = 3)
bbs_matrix_birth_year(fec$eFecundity)
#> , , 1
#> 
#>      [,1]      [,2]
#> [1,]    1 0.3340939
#> [2,]    0 1.0000000
#> 
#> , , 2
#> 
#>      [,1]      [,2]
#> [1,]    1 0.3340939
#> [2,]    0 1.0000000
#> 
#> , , 3
#> 
#>      [,1]      [,2]
#> [1,]    1 0.3340939
#> [2,]    0 1.0000000
#>