Each stage can vary by intercept, year trend, annual random effect, period random effect and period within annual random effect. All values are provided on the log-odds scale. Variation from random effects is stochastic. Year is scaled to Year - 1 for trend, which ensures that the intercept is the rate in the first year.

bbs_survival(
  intercept,
  nyear = 10,
  trend = rep(0, length(intercept)),
  annual_sd = rep(0, length(intercept)),
  period_sd = rep(0, length(intercept)),
  annual_period_sd = rep(0, length(intercept)),
  nperiod_within_year = 12
)

Arguments

intercept

A vector of the intercept of the log-odds survival by stage.

nyear

A whole number of the number of years.

trend

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

annual_sd

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

period_sd

A vector of the standard deviation of the period variation of the log-odds survival by stage.

annual_period_sd

A vector of the standard deviation of the period within annual variation on the log-odds survival by stage.

nperiod_within_year

A whole number of the number of periods in a year.

Value

An array of survival rates with dimensions period, year, stage.

Examples

survival <- bbs_survival(intercept = logit(c(0.94, 0.98, 0.98)), trend = c(0, 0, 0.2))