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)
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
.
Expectation of covariance matrix ( diagonal scaled to 1) of the Gaussian copula graphical model
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., and Wit, E. C. (2017c). netgwas: An R Package for Network-Based Genome-Wide Association Studies. arXiv preprint, arXiv:1710.01236. 2. Behrouzi, P., and Wit, E. C. (2017a). Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv preprint, arXiv:1710.00894.
# NOT RUN {
D <- simgeno(p = 100, n = 50, k = 3)
R.gibbs(D$data, ncores=1)
# }
Run the code above in your browser using DataLab