Year is scaled to Year - 1 for trend, which ensures that the intercept is the rate in the first year.

bbs_fecundity(
  intercept,
  trend = rep(0, length(intercept)),
  annual_sd = rep(0, length(intercept)),
  nyear = 10
)

Arguments

intercept

A vector of the intercept of the log-odds fecundity by stage. If NA, fecundity is set to 0 for all years.

trend

A vector of the effect of an increase of one year on the log-odds fecundity by stage.

annual_sd

A vector of the standard deviation of the annual variation on the log-odds fecundity by stage.

nyear

A whole number of the number of years.

Value

A matrix of fecundity rates with dimensions year and stage.

Examples

bbs_fecundity(c(NA, logit(0.4)), trend = c(NA, 0.1), annual_sd = c(NA, 0.05))
#> $eFecundity
#>       [,1]      [,2]
#>  [1,]    0 0.3833230
#>  [2,]    0 0.4273432
#>  [3,]    0 0.4188908
#>  [4,]    0 0.4735887
#>  [5,]    0 0.5064028
#>  [6,]    0 0.5379159
#>  [7,]    0 0.5258380
#>  [8,]    0 0.5700778
#>  [9,]    0 0.5944337
#> [10,]    0 0.6178422
#> 
#> $b0
#> [1]         NA -0.4054651
#> 
#> $bYear
#> [1]  NA 0.1
#> 
#> $bAnnual
#>       [,1]          [,2]
#>  [1,]    0 -0.0700021758
#>  [2,]    0  0.0127658527
#>  [3,]    0 -0.1218631806
#>  [4,]    0 -0.0002785643
#>  [5,]    0  0.0310776361
#>  [6,]    0  0.0574205803
#>  [7,]    0 -0.0910908830
#>  [8,]    0 -0.0123662651
#>  [9,]    0 -0.0122099803
#> [10,]    0 -0.0141352724
#>