RW2_Infant {bage}R Documentation

Second-Order Random Walk Prior with 'Infant' Indicator

Description

Use a second-order random walk to model variation over age, with an indicator variable for the first age group. Designed for use in models of mortality rates.

Usage

RW2_Infant(s = 1, sd_slope = 1, con = c("none", "by"))

Arguments

s

Scale for the prior for the innovations. Default is 1.

sd_slope

Standard deviation for initial slope of random walk. Default is 1.

con

Constraints on parameters. Current choices are "none" and "by". Default is "none". See below for details.

Details

A second-order random walk prior RW2() works well for smoothing mortality rates over age, except at age 0, where there is a sudden jump in rates, reflecting the special risks of infancy. The RW2_Infant() extends the RW2() prior by adding an indicator variable for the first age group.

If RW2_Infant() is used in an interaction, the 'along' dimension is always age, implying that there is a separate random walk along age within each combination of the 'by' variables.

Argument s controls the size of innovations in the random walk. Smaller values for s tend to give smoother series.

Argument sd controls the sl size of innovations in the random walk. Smaller values for s tend to give smoother series.

Value

Object of class "bage_prior_rw2infant".

Mathematical details

When RW2_Infant() is used with a main effect,

\beta_1 \sim \text{N}(0, 1)

\beta_2 \sim \text{N}(0, \mathtt{sd\_slope}^2)

\beta_3 \sim \text{N}(2 \beta_2, \tau^2)

\beta_j \sim \text{N}(2 \beta_{j-1} - \beta_{j-2}, \tau^2), \quad j = 3, \cdots, J

and when it is used with an interaction,

\beta_{u,1} \sim \text{N}(0, 1)

\beta_{u,2} \sim \text{N}(0, \mathtt{sd\_slope}^2)

\beta_{u,3} \sim \text{N}(2 \beta_{u,2}, \tau^2)

\beta_{u,v} \sim \text{N}(2 \beta_{u,v-1} - \beta_{u,v-2}, \tau^2), \quad v = 3, \cdots, V

where

Parameter \tau has a half-normal prior

\tau \sim \text{N}^+(0, \mathtt{s}^2)

.

Constraints

With some combinations of terms and priors, the values of the intercept, main effects, and interactions are are only weakly identified. For instance, it may be possible to increase the value of the intercept and reduce the value of the remaining terms in the model with no effect on predicted rates and only a tiny effect on prior probabilities. This weak identifiability is typically harmless. However, in some applications, such as forecasting, or when trying to obtain interpretable values for main effects and interactions, it can be helpful to increase identifiability through the use of constraints.

Current options for constraints are:

See Also

Examples

RW2_Infant()
RW2_Infant(s = 0.1)

[Package bage version 0.9.0 Index]