Fit cluster-level space-time smoothing models to mortality rates
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)
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 of the model. This can be either binomial (with logistic normal prior) or betabiniomial.
a character vector of age groups in increasing order.
number of months in each age groups in the same order.
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.
Adjacency matrix for the regions
Geo file
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".
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")`.
INLA formula. See vignette for example of using customized formula.
Take values 1 or 2, indicating the order of random walk.
string vector of year names
priors from simhyper
type for space-time interaction
which hyperpriors to use. Default to be using the PC prior ("pc").
hyperparameter U for the PC prior on precisions.
hyperparameter alpha for the PC prior on precisions.
hyperparameter U for the PC prior on the mixture probability phi in BYM2 model.
hyperparameter alpha for the PC prior on the mixture probability phi in BYM2 model.
hyperparameter for i.i.d random effects.
hyperparameter for i.i.d random effects.
hyperparameter for RW 1 or 2 random effects.
hyperparameter for RW 1 or 2random effects.
hyperparameter for ICAR random effects.
hyperparameter for ICAR random effects.
list of options to be passed to control.compute() in the inla() function.
logical indicator to print out detailed inla() intermediate steps.
INLA model fit using the provided formula, country summary data, and geographic data
# NOT RUN {
message("Please check the package vignette on binomial models.")
# }
Run the code above in your browser using DataLab