Get the samples from the posterior distribution of the residual covariance matrix, together with the posterior mean and quantiles.
get_sigma(m)
a model fitted with jtdm_fit
A list containing:
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
Posterior mean of the residual covariance matrix.
97.5% and 0.25% posterior quantiles of the residual covariance matrix.
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)