This function implements the Gibbs sampling method within Gaussian copula graphical model to estimate the conditional expectation for the data that not follow Gaussianity assumption (e.g. ordinal, discrete, continuous non-Gaussian, or mixed dataset).
R.gibbs(y, theta, gibbs.iter = 1000, mc.iter = 500,
ncores = NULL, verbose = TRUE)
Expectation of covariance matrix ( diagonal scaled to 1) of the Gaussian copula graphical model
An (\(n \times p\)) matrix or a data.frame
corresponding to the data matrix (\(n\) is the sample size and \(p\) is the number of variables).
It also could be an object of class "simgeno"
.
A \(p \times p\) precision matrix. Default is a diagonal matrix.
The number of burn-in for the Gibbs sampling. The default value is 1000.
The number of Monte Carlo samples to calculate the conditional expectation. The default value is 500.
If ncores = NULL
, the algorithm internally detects number of available cores and run the calculations in parallel on (available cores - 1). Typical usage is to fix ncores = 1
when \(p\) is small \(( p < 500 )\), and ncores = NULL
when \(p\) is very large.
If verbose = FALSE
, printing information is disabled. The default value is TRUE
.
Pariya Behrouzi, Danny Arends and Ernst C. Wit
Maintainers: Pariya Behrouzi pariya.behrouzi@gmail.com
This function calculates \(\bar{R}\) using Gibbs sampling method within the E-step of EM algorithm, where $$ \bar{R} = n ^ {-1} \sum_{i=1}^{n} E( Z^{(i)} Z^{(i)t} | y^{(i)}, \hat{\Theta}^{(m)})$$ which \(n\) is the number of sample size and \(Z\) is the latent variable which is obtained from Gaussian copula graphical model.
1. Behrouzi, P., Arends, D., and Wit, E. C. (2023). netgwas: An R Package for Network-Based Genome-Wide Association Studies. The R journal, 14(4), 18-37.
2. Behrouzi, P., and Wit, E. C. (2019). Detecting epistatic selection with partially observed genotype data by using copula graphical models. Journal of the Royal Statistical Society: Series C (Applied Statistics), 68(1), 141-160.
D <- simgeno(p = 100, n = 50, k = 3)
R.gibbs(D$data, ncores=1)
Run the code above in your browser using DataLab