Learn R Programming

SUMMER (version 0.3.0)

fitINLA2: Fit cluster-level space-time smoothing models to mortality rates

Description

Fit cluster-level space-time smoothing models to mortality rates

Usage

fitINLA2(data, family = c("betabinomial", "binomial")[1],
  age.groups = c("0", "1-11", "12-23", "24-35", "36-47", "48-59"),
  age.n = c(1, 11, 12, 12, 12, 12), age.rw.group = 1:6, Amat, geo,
  bias.adj = NULL, bias.adj.by = NULL, formula = NULL, rw = 2,
  year_label, priors = NULL, type.st = 1, hyper = c("pc",
  "gamma")[1], pc.u = 1, pc.alpha = 0.01, pc.u.phi = 0.5,
  pc.alpha.phi = 2/3, a.iid = NULL, b.iid = NULL, a.rw = NULL,
  b.rw = NULL, a.icar = NULL, b.icar = NULL, options = list(config
  = TRUE), verbose = FALSE)

Arguments

data

count data of person-months with the following columns

  • cluster: cluster ID

  • years: time period

  • region: region of the cluster

  • strata: stratum of the cluster

  • age: age group corresponding to the row

  • total: total number of person-month in this age group, stratum, cluster, and period

  • Y: total number of deaths in this age group, stratum, cluster, and period

family

family of the model. This can be either binomial (with logistic normal prior) or betabiniomial.

age.groups

a character vector of age groups in increasing order.

age.n

number of months in each age groups in the same order.

age.rw.group

vector indicating grouping of the ages groups. For example, if each age group is assigned a different random walk component, then set age.rw.group to c(1:length(age.groups)); if all age groups share the same random walk component, then set age.rw.group to a rep(1, length(age.groups)). The default for 6 age groups is c(1,2,3,3,3,3), which assigns a separate random walk to the first two groups and a common random walk for the rest of the age groups. The vector should contain values starting from 1.

Amat

Adjacency matrix for the regions

geo

Geo file

bias.adj

the ratio of unadjusted mortality rates or age-group-specific hazards to the true rates or hazards. It needs to be a data frame that can be merged to thee outcome, i.e., with the same column names for time periods (for national adjustment), or time periods and region (for subnational adjustment). The column specifying the adjustment ratio should be named "ratio".

bias.adj.by

vector of the column names specifying how to merge the bias adjustment to the count data. For example, if bias adjustment factor is provided in bias.adj for each region and time, then bias.adj.by should be `c("region", "time")`.

formula

INLA formula. See vignette for example of using customized formula.

rw

Take values 1 or 2, indicating the order of random walk.

year_label

string vector of year names

priors

priors from simhyper

type.st

type for space-time interaction

hyper

which hyperpriors to use. Default to be using the PC prior ("pc").

pc.u

hyperparameter U for the PC prior on precisions.

pc.alpha

hyperparameter alpha for the PC prior on precisions.

pc.u.phi

hyperparameter U for the PC prior on the mixture probability phi in BYM2 model.

pc.alpha.phi

hyperparameter alpha for the PC prior on the mixture probability phi in BYM2 model.

a.iid

hyperparameter for i.i.d random effects.

b.iid

hyperparameter for i.i.d random effects.

a.rw

hyperparameter for RW 1 or 2 random effects.

b.rw

hyperparameter for RW 1 or 2random effects.

a.icar

hyperparameter for ICAR random effects.

b.icar

hyperparameter for ICAR random effects.

options

list of options to be passed to control.compute() in the inla() function.

verbose

logical indicator to print out detailed inla() intermediate steps.

Value

INLA model fit using the provided formula, country summary data, and geographic data

See Also

getDirect

Examples

Run this code
# NOT RUN {
message("Please check the package vignette on binomial models.")

# }

Run the code above in your browser using DataLab