# multiRegression: multiRegression In fssemR: Fused Sparse Structural Equation Models to Jointly Infer Gene Regulatory Network

 multiRegression R Documentation

## multiRegression

### Description

Ridge regression on multiple conditions, initialization of FSSEM algorithm

### Usage

```multiRegression(Xs, Ys, Sk, gamma, n, p, k, trans = FALSE)
```

### Arguments

 `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

### Value

fit List of SEM model

Bs

coefficient matrices of gene regulatory networks

fs

eQTL's coefficients w.r.t each gene

Fs

coefficient matrices of eQTL-gene effect

mu

Bias vector

sigma2

estimate of covariance in SEM

### Examples

```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)
```

fssemR documentation built on March 18, 2022, 7:24 p.m.