View source: R/GE_translate_inputs.R
| GE_translate_inputs | R Documentation |
Mostly for internal use, function called by GE_bias_normal() and GE_scoreeq_sim() to translate the rho_list inputs and return a total covariance matrix for simulation/ checking validity of covariance structure. If invalid covariance structure, will stop and return an error message.
GE_translate_inputs(beta_list, rho_list, prob_G, cov_Z = NULL,
cov_W = NULL, corr_G = NULL)
beta_list |
A list of the effect sizes in the true model. Use the order beta_0, beta_G, beta_E, beta_I, beta_Z, beta_M. If G or Z or M is a vector, then beta_G/beta_Z/beta_M should be vectors. If Z and/or M/W do not exist in your model, then set beta_Z and/or beta_M = 0. |
prob_G |
Probability that each allele is equal to 1. Since each SNP has two alleles, the expectation of G is 2*prob_G. |
cov_Z |
Should be a matrix equal to cov(Z) or NULL if no Z. |
cov_W |
Should be a matrix equal to cov(W) or NULL if no W. |
corr_G |
Should be a matrix giving the *pairwise correlations* between each SNP in the set, or NULL. Must be specified if G is a vector. For example, the [2,3] element of the matrix would be the pairwise correlation between SNP2 and SNP3. Diagonal should be 1. |
A list with the elements:
sig_mat_total |
The sigma parameter for rmvnorm call to generate our data. |
GE_translate_inputs( beta_list=as.list(runif(n=6, min=0, max=1)),
rho_list=as.list(rep(0.3,6)), prob_G=0.3, cov_Z=1, cov_W=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.