Learn R Programming

jtdm (version 0.1-2)

get_sigma: Get the inferred residual covariance matrix

Description

Get the samples from the posterior distribution of the residual covariance matrix, together with the posterior mean and quantiles.

Usage

get_sigma(m)

Value

A list containing:

Ssamples

Sample from the posterior distribution of the residual covariance matrix. It is an array where the first two dimensions are the rows and columns of the matrix, and the third dimensions are the samples from the posterior distribution

Smean

Posterior mean of the residual covariance matrix.

Sq975,Sq025

97.5% and 0.25% posterior quantiles of the residual covariance matrix.

Arguments

m

a model fitted with jtdm_fit

Examples

Run this code
data(Y)  
data(X) 
# Short MCMC to obtain a fast example: results are unreliable !
m = jtdm_fit(Y=Y, X=X, formula=as.formula("~GDD+FDD+forest"), sample = 1000) 
# get the inferred residual covariance
Sigma =get_sigma(m)

Run the code above in your browser using DataLab