Skip to contents

The models created with functions mod_pois(), mod_binom(), and mod_norm() always include an intercept, and typically include main effects and interactions formed from variables in input data. Most models, for instance include an age effect, and many include an interaction between age and sex/gender, or age and time.

The intercept, main effects, and interactions all have prior models that capture the expected behavior of the term. Current choices for priors summarised in the table below.

Priors where 'forecast' is yes can be used in forecasts for a time-varying terms such as an age-time interactions.

Priors where zero_sum is yes have an argument specifying whether sum-to-zero constraints should be used.

Details

PriorDescriptionUsesForecastzero_sum
N()Elements drawn from normal distributionTerm with no natural orderYesNo
NFix()As for N(), but standard deviation fixedTerm with few elementsYesNo
RW()Random walkSmoothingYesYes
RW2()Second-order random walkLike RW(), but smootherYesYes
RW_Seas()Random walk, with seasonal effectTerms involving timeYesYes
RW2_Seas()Second-order random walk, with seasonal effectTerm involving timeYesYes
AR()Auto-regressive prior of order kMean reversionYesYes
AR1()Auto-regressive prior of order 1 Special case of AR()Mean reversionYesYes
Known()Values treated as knownSimulations, prior knowledgeNoNo
Lin()Linear trend, with independent normalParsimonious model for timeYesYes
Lin_AR()Linear trend, with autoregressive errorsTerm involving timeYesYes
Lin_AR1()Linear trend, with AR1 errorsTerms involving timeYesYes
Sp()P-Spline (penalised spline)Smoothing, eg over ageNoYes
SVD()Age or age-sex profile based on SVD of databaseAge 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_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

Default prior

The rule for selecting a default prior for a term is:

  • if term has less than 3 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().