Mmodel_compute_cor {bigDM}R 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. See Details for more information.

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.


[Package bigDM version 0.5.3 Index]