Models for Correlation Matrices Based on Graphs
Information for a base model for correlation matrices
Internal functions used by basecor
Information for a base model for correlation matrices
Build an cgeneric for a graph, see graphpcor()
Build an cgeneric model for the LKG prior on correlation matrix.
Build an cgeneric object to implement the PC prior, proposed on Simp...
Build an cgeneric object to implement the PC-prior of a precision ma...
Build an cgeneric for treepcor())
Build an cgeneric to implement the Wishart prior for a precision mat...
The LKJ density for a correlation matrix
Function to fill-in a Cholesky matrix
graphpcor: correlation from nodes and edges
Evaluate the hessian of the KLD for a graphpcorcorrelation model aro...
Compute the KLD between two multivariate Gaussian distributions, assum...
The Laplacian of a graph
Compute the (lower triangle) Cholesky of the initial precision Q0.
Internal functions to map between Euclidean and spherical coordinates
treepcor: correlation from tree
Implement some models for correlation/covariance matrices including two approaches to model correlation matrices from a graphical structure. One use latent parent variables as proposed in Sterrantino et. al. (2024) <doi:10.1007/s10260-025-00788-y>. The other uses a graph to specify conditional relations between the variables. The graphical structure makes correlation matrices interpretable and avoids the quadratic increase of parameters as a function of the dimension. In the first approach a natural sequence of simpler models along with a complexity penalization is used. The second penalizes deviations from a base model. These can be used as prior for model parameters, considering C code through the 'cgeneric' interface for the 'INLA' package (<https://www.r-inla.org>). This allows one to use these models as building blocks combined and to other latent Gaussian models in order to build complex data models.