View source: R/SimulationData.R
SimulationData | R Documentation |
SimulationData(N_samples, N_genes, Adj, Sigma, method, beta0=NULL, beta_true=NULL)
N_samples |
the number of sample size. |
N_genes |
the number of traget genes. |
Adj |
the adjacency matrix of network structure. Adjacency matrix must be a N_genes*N_genes dimensional symmetric matrix, the elements equal 1 indicates two genes are connected. If you consider Barabasi-Albert Network or Hierarchical Network in the article, you can directly use "ConstructNetwork" function to get the adjacency matrix. |
Sigma |
the covariance matrix of target genes according to network structure. You can directly use "GraphicalModel" function to get the covariance matrix. |
method |
"HN": by Hierarchical Network, "BAN": by Barabasi-Albert Network or "DIY": by user designed |
beta0 |
numeric value of effect size in simulation settings. # default: NULL; if method is "HN" or "BAN", input a nunerical value. |
beta_true |
numeric matrix with the dimension of N_genes * 1 in simulation settings. # default: NULL; if method is "DIY", input a nunerical matrix (N_genes * 1). |
y |
expression levels of a transcription factor (TF) |
X |
expression levels of n_genes target genes (TGs) |
beta |
true regulated effect beta for N_genes TGs. |
N_samples <- 300
N_genes <- 200
Adj = ConstructNetwork(N_genes, "BAN")
Sigma1 = GraphicalModel(Adj)
# Set up a true regression coefficient for simulated data (beta0=1)
res = SimulationData(N_samples,N_genes,Adj,Sigma1,"BAN", beta0 = 1)
y = res$y
X = res$X
beta1 = res$beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.