Skip to contents

The models created with mod_pois(), mod_binom(), and mod_norm() include terms such as age effects and region-time interactions. Each of these terms requires a prior distribution. Current options for these priors are summarised in the table below.

Details

PriorDescriptionUsesForecastAlong/By
N()Elements drawn from normal distributionTerm with no natural orderYesNo
NFix()N() with standard deviation fixedTerm with few elementsYesNo
Known()Values treated as knownSimulations, prior knowledgeNoNo
RW()Random walkSmoothingYesYes
RW2()Second-order random walkLike RW(), but with trendsYesYes
DRW()Damped random walkSmoothing, forecastingYesYes
DRW2()Damped second-order random walkLike DRW(), but with trendsYesYes
RW2_Infant()RW2() with infant indicatorMortality age profilesNoYes
RW_Seas()RW(), with seasonal effectTerms involving timeYesYes
RW2_Seas()RW2(), with seasonal effectTerm involving timeYesYes
AR()Auto-regressive prior of order kMean reversion, forecastingYesYes
AR1()Special case of AR()Mean reversion, forecastingYesYes
Lin()Linear trend, with independent errorsParsimonious model for timeYesYes
Lin_AR()Linear trend, with AR errorsTerm involving time, forecastingYesYes
Lin_AR1()Linear trend, with AR1 errorsTerms involving time, forecastingYesYes
Sp()P-Spline (penalised spline)Smoothing, eg over ageNoYes
SVD()Age-sex profile based on SVDAge or age-sexNoNo
SVD_AR()SVD(), but coefficients follow AR()Age or age-sex and timeYesYes
SVD_AR1()SVD(), but coefficients follow AR1()Age or age-sex and timeYesYes
SVD_Lin()SVD(), but coefficients follow Lin()Age or age-sex and timeYesYes
SVD_RW()SVD(), but coefficients follow RW()Age or age-sex and timeYesYes
SVD_RW2()SVD(), but coefficients follow RW2()Age or age-sex and timeYesYes
SVD_DRW()SVD(), but coefficients follow DRW()Age or age-sex and timeYesYes
SVD_DRW2()SVD(), but coefficients follow DRW2()Age or age-sex and timeYesYes

'Along' and 'by' dimensions

Priors for interaction terms often consist of a time-series-style model along one dimension, with a separate series for each combination of the remaining dimensions. For instance, a prior for an age-sex-time interaction might consist of a separate random walk along time for each combination of age-group and sex. In bage the dimension with the time-series-type model is referred to as the 'along' dimension, and the remaining dimensions are referred to as the 'by' dimensions.

Default prior

If no prior is specified for a term, then bage assigns the term a default prior using the following algorithm:

  • if the term has one or two elements, use NFix();

  • otherwise, if the term involves time, use RW(), with time as the 'along' dimension;

  • otherwise, if the term involves age, use RW(), with age as the 'along' dimension;

  • otherwise, use N().

Forecasting

A model can only be used for forecasting if

  • the model includes a time dimension, and

  • the prior for the time dimension supports forecasting.

If necessary, the time dimension can be identified using set_var_time(). The table above lists the priors that support forecasting.