weights_gausscopula {saturnin} | R Documentation |
Computation of the weight matrix in a gaussian copula setting.
Description
The function computes the weights of all edges in a gaussian copula setting.
The result should be used in edge.prob with argument log
set to FALSE
.
The function brings the values of all variables back to [0;1]
by computing univariate empirical cdf functions.
The prior distribution for the correlation of the bivariate gaussian copulas prior
can be set to either "uniform"
or "beta"
. Beta prior is understood as a beta distribution with a change of variables to bring it back to [-1;1]
.
Computation can be parallelized by setting nbcores
to more than 2. Parallelization relies on parallel
.
Usage
weights_gausscopula(data, prior_type = "uniform", a = 1, b = 1, nbcores = 1)
Arguments
data |
Matrix containing the data. |
prior_type |
Prior to be used for the correlation. |
a |
Shape parameter 1 for beta prior. |
b |
Shape parameter 2 for beta prior. |
nbcores |
Number of cores to be used in parallelized computation. |
Value
W |
weight matrix. |
Author(s)
Loïc Schwaller
References
This package implements the method described in the paper "Bayesian Inference of Graphical Model Structures Using Trees" by L. Schwaller, S. Robin, M. Stumpf, 2015 (submitted and availavable on arXiv).
Examples
library('saturnin')
data(data_multinomial)
W <- weights_gausscopula(data_multinomial)
prob <- edge.prob(W, log = FALSE)