This function simulates data from a random graphical model. The graphical model is a Gaussian graphical model, with a mean zero vector and condition-specific precision matrices. The random graph model is a latent probit model, which includes condition-specific intercepts, a 2D latent space model and an edge specific covariate.
#sim.rgm(n = 1000, D = 2, p = 81, B = 10,
#seed = 123, mcmc_iter = 50, alpha = NULL,
#theta = NULL, loc = NULL, X = NULL)A list with the following elements:
A list of B elements, where each element contains an n x p matrix of simulated Gaussian data.
An n.edge x ncol(X) data matrix of edge covariates.
A B x D matrix of the true condition-specific coordinates.
A B-dimensional vector of the true condition-specific intercepts.
A vector of the true regression coefficients associated to the covariates in X.
An n.edge x B matrix of the true graphs.
The sparsity of the graphs generated across the mcmc_iter iterations, as a diagnostic tool for convergence.
The number of observations for each environment. Default is 1000.
The dimension of the latent space. Default is 2.
The number of nodes in each graph. Default is 81.
The number of conditions. Default is 10.
The random seed. Default is 123.
The number of MCMC sampling for the generation of the graphs from the joint random graph distribution. Default is 50.
The true values of the condition-specific intercepts. If NULL, these are drawn from a N(-2,1) distribution.
The true values of the regression coefficients associated to the covariates in X. If NULL, this is set to 2.5.
The true coordinates of the B locations in the latent space. If NULL, these are drawn from a N(0,0.3) distribution.
The edge specific covariates. If NULL, the data for one covariates is drawn from a Uniform(-0.5,0.5) distribution.
sim_data <- sim.rgm(n = 10, D = 2, p = 7, B = 5)
Run the code above in your browser using DataLab