Mmodel_compute_cor: Compute correlation coefficients between diseases

View source: R/MCAR_INLA.R

Mmodel_compute_corR Documentation

Compute correlation coefficients between diseases

Description

This function takes a inla object fitted using the MCAR_INLA function and computes the correlation coefficients between diseases.

Usage

Mmodel_compute_cor(model, n.sample = 10000)

Arguments

model

object of class inla fitted using the MCAR_INLA function.

n.sample

numeric; number of samples to generate from the approximated joint posterior for the hyperparameters (see help(inla.hyperpar.sample)). Default to 1000.

Value

The input inla object with two additional elements:

summary.cor

A data.frame containing the mean, standard deviation, quantiles and mode of the correlation coefficients between diseases.

marginals.cor

A list containing the posterior marginal densities of the correlation coefficients between diseases.

summary.var

A data.frame containing the mean, standard deviation, quantiles and mode of the variances for each disease.

marginals.var

A list containing the posterior marginal densities of the variances for each disease.


spatialstatisticsupna/bigDM documentation built on Aug. 22, 2024, 12:35 p.m.