library(ebdbNet)
library(GeneNet) ## Load GeneNet package to use T-cell activation data
tmp <- runif(1) ## Initialize random number generator
set.seed(4568818) ## Set seed
## Load T-cell activation data
data(tcell)
tc44 <- combine.longitudinal(tcell.10, tcell.34)
## Put data into correct format for algorithm
## (List, with one matrix per replicate (P rows and T columns)
tcell.dat <- dataFormat(tc44)
## Use only subset of T-cell data for faster example
R <- 5 ## 5 replicates
T <- 10 ## 10 time points
P <- 15 ## 15 genes
tcell.sub.dat <- vector("list", R)
for(r in 1:R) {
tcell.sub.dat[[r]] <- tcell.dat[[r]][1:P, 1:T]
}
####################################################
# Run EBDBN (no hidden states) with feedback loops
####################################################
## Choose alternative value of K using hankel if hidden states to be estimated
## K <- hankel(tcell.sub.dat, lag = 1)$dim
## Run algorithm
net <- ebdbn(input = "feedback", tcell.sub.dat, K = 0, conv.1 = 0.10,
conv.2 = 0.01, conv.3 = 0.01)
## Use z-score significance level of 99%
z <- zCutoff(net$DPost, net$DvarPost)$z99
Run the code above in your browser using DataLab