The goal of dineR is to enable users of all backgrounds to easily and computationally efficiently perform differential network estimation.
You can install the released version of dineR from CRAN with:
install.packages("dineR")
This is a basic example which shows you how to solve a common problem:
library(dineR)
# Data Generation
<- 100
n_X <- n_X
n_Y <- 100
p_X <- p_X
p_Y #case <- "sparse"
<- "asymsparse"
case
<- data_generator(n = n_X, p = p_X, seed = 123)
data
<- data$X
X <- data$Y
Y <- data$diff_Omega
diff_Omega paste("The number of non-zero entries in the differential network is: ", sum(diff_Omega!=0))
# Estimation Preliminaries (All of the parameters are now optional as the function has pre-specified defaults)
<- "lasso"
loss <- 50
nlambda <- "AIC"
tuning <- 1e-4
stop_tol <- F
perturb <- F
correlation <- 500
max_iter <- 0.5
lambda_min_ratio #gamma <- 1 #Only if we use EBIC
# Estimation
<- estimation(X, Y, loss = loss, nlambda = nlambda, tuning = tuning, stop_tol = stop_tol,
result perturb = perturb, correlation = correlation,
max_iter = max_iter, lambda_min_ratio = lambda_min_ratio)
# Results
print(result$path[[1]][1:5,1:5])
$elapse result