Biology Reference
In-Depth Information
(c) It is not possible to fit a VAR process with the default approach proposed in the
package vars as the number of variable is greater (49 genes) than the number
of measurements (22 time points).
Ifwetrytodothat,
> dataVar2inline = dataVar2[c(seq(1, 22, by = 2),
+ seq(2, 22, by = 2)), ]
> library(vars)
> var.1c = VAR(data, p = 1, type = "const")
The estimated coefficient contains many missing values ( NA ); therefore, ap-
proaches allowing for dimension reduction are required to analyze these data.
(d) We consider the following dimension reduction approaches:
L 1 norm penalty (LASSO)
James-Stein shrinkage
Low-order conditional dependencies approximation
(e) Various approaches for reduction dimension
LASSO with lars :
> library(lars)
> data = dataVar2inline
> x = data[-c(21:22), ]
> fit.all = lapply(colnames(data),
+ function(gene) {
+ y = data[-(1:2), gene]
+ lars(y = y, x = x, type = "lasso")
+ )
> cv.pred.all = lapply(1:dim(data)[2],
+
function(gene) {
+
y = data[-(1:2), gene]
+
lasso.cv = cv.lars(y = y, x = x,
+
mode = "fraction")
+
frac = lasso.cv$index[
+
which.min(lasso.cv$cv)]
+
predict(fit.all[[gene]], s = frac,
+
type = "coef", mode = "fraction")
+})
> DBNlasso = matrix(0, dim(data)[2], dim(data)[2])
> for (i in 1:dim(DBNlasso)[1]) {
+
DBNlasso[i, ] =
+
cv.pred.all[i][[1]]$coefficients
+}
> # percentage of arcs
> sum(DBNlasso != 0)
[1] 421
Search WWH ::




Custom Search