CV: Multivariate mortality data from Comunidad Valenciana (Spain)

Description Usage Format Source References See Also Examples

Description

Simulated multivariate mortality data from Comunidad Valenciana (Spain). The data set contains (simulated) observed and expected deaths for Cirrhosis, Lung cancer and Cirrhosis for the Valencian municipalities. The supplied data have been simulated mimicking the original data set which has privacy restrictions. Additional details on the generation of the supplied dataset can be found at the original book.

Usage

1

Format

A SpatialPolygonsDataFrame with the boundaries of the municipalities in Comunidad Valenciana with the following columns:

CODMUNI

Municipality code.

NOMBRE

Name of the municipality.

Exp.Cirrhosis

Expected number of cases of cirrhosis.

Exp.Lung

Expected number of cases of lung cancer.

Exp.Oral

Expected number of cases of oral cavity cancer.

Obs.Cirrhosis

Observed number of cases of cirrhosis.

Obs.Lung

Observed number of cases of lung cancer.

Obs.Oral

Observed number of cases of oral cavity cancer.

Source

The original data set is supplied as supplementary material of the book: "Martinez-Beneito, M A & Botella Rocamora, P. Disease mapping: from foundations to multidimensional modeling. CRC/Chapman & Hall, 2019". This object has been built from several of the files available at the supplementary material repository of the book at: https://github.com/MigueBeneito/DisMapBook/tree/master/Data

References

Martinez-Beneito, M A & Botella Rocamora, P. Disease mapping: from foundations to multidimensional modeling. CRC/Chapman & Hall, 2019.

Palmí-Perales F, Gómez-Rubio V, Martinez-Beneito MA (2021). “Bayesian Multivariate Spatial Models for Lattice Data with INLA.” _Journal of Statistical Software_, *98*(2), 1-29. doi: 10.18637/jss.v098.i02 (URL: https://doi.org/10.18637/jss.v098.i02).

See Also

CV.nb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
if(require(INLA, quietly = TRUE)) {
require(sp)
require(spdep)
data(CV)
W <- as(nb2mat(CV.nb, style = "B"), "Matrix")

#Data (two diseases only)
d <- list(OBS = c(CV$Obs.Cirrhosis, CV$Obs.Lung),
 EXP = c(CV$Exp.Cirrhosis, CV$Exp.Lung))

 # Index for latent effect
d$idx <- 1:length(d$OBS)

k <- 2  #Number of diseases

# Linear constraint for models
A <- kronecker(Diagonal(k, 1), Matrix(1, ncol = nrow(W), nrow = 1))
e = rep(0, k)

# Two independent ICAR models
#model <- inla.rgeneric.define(inla.rgeneric.indep.IMCAR.model,
#  k = k, W = W)
model <- inla.INDIMCAR.model(k = k, W = W)
r.simcar <- try(
  inla(OBS ~ 1 + f(idx, model = model, extraconstr = list(A = as.matrix(A), e = e)),
    data = d, E = EXP, family = "poisson",
     # To run faster, REMOVE in real applications
     control.mode = list(theta = c(1.4, 2.1), restart = TRUE),
    control.predictor = list(compute = TRUE))
)
summary(r.simcar)

# IMCAR model
#model <- inla.rgeneric.define(inla.rgeneric.IMCAR.model,
#  k = k, W = W, alpha.min = 0, alpha.max = 1)
model <- inla.IMCAR.model(k = k, W = W)
r.imcar <- try(
  inla(OBS ~ 1 + f(idx, model = model, extraconstr = list(A = as.matrix(A), e = e)),
    data = d, E = EXP, family = "poisson",
     # To run faster, REMOVE in real applications
     control.mode = list(theta = c(1.77, 2.01, 0.93),
       restart = TRUE),
    control.compute = list(config = TRUE),
    control.predictor = list(compute = TRUE))
)
summary(r.imcar)

# Transform parameters
summary.post <- inla.MCAR.transform(r.imcar, k = k)

# Posterior of variance matrix
summary.post$VAR.p # Using point estimates
summary.post$VAR.m # Using posterior sampling

} #if(require(INLA))
 

INLAMSM documentation built on June 4, 2021, 9:07 a.m.