multiRegression | R Documentation |
Ridge regression on multiple conditions, initialization of FSSEM algorithm
multiRegression(Xs, Ys, Sk, gamma, n, p, k, trans = FALSE)
Xs |
eQTL matrices. eQTL matrix can be matrix/list of multiple conditions |
Ys |
Gene expression matrices |
Sk |
eQTL index of genes |
gamma |
Hyperparameter for ridge regression |
n |
number of observations |
p |
number of genes |
k |
number of eQTLs |
trans |
if rows for sample, trans = TRUE, otherwise, trans = FALSE. Default FALSE |
fit List of SEM model
coefficient matrices of gene regulatory networks
eQTL's coefficients w.r.t each gene
coefficient matrices of eQTL-gene effect
Bias vector
estimate of covariance in SEM
seed = 1234 N = 100 # sample size Ng = 5 # gene number Nk = 5 * 3 # eQTL number Ns = 1 # sparse ratio sigma2 = 0.01 # sigma2 set.seed(seed) data = randomFSSEMdata(n = N, p = Ng, k = Nk, sparse = Ns, df = 0.3, sigma2 = sigma2, u = 5, type = "DG", nhub = 1, dag = TRUE) ## If we assume that different condition has different genetics perturbations (eQTLs) ## data$Data$X = list(data$Data$X, data$Data$X) gamma = cv.multiRegression(data$Data$X, data$Data$Y, data$Data$Sk, ngamma = 20, nfold = 5, N, Ng, Nk) fit = multiRegression(data$Data$X, data$Data$Y, data$Data$Sk, gamma, N, Ng, Nk, trans = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.