# set dimensions
p <- 3; n <- 4; T <- 10
# set model parameters
SigmaE <- diag(p)/4
A <- createA(p, "chain")
# generate data
Y <- dataVAR1(n, T, A, SigmaE)
# fit VAR(1) model
VAR1hat <- ridgeVAR1(Y, 1, 1)
## determine which elements of A are non-null
Anullornot <- matrix(0, p, p)
Anullornot[sparsifyVAR1(VAR1hat$A, solve(VAR1hat$P),
threshold="localFDR")$nonzeros] <- 1
## REASON FOR NOT RUN:
## the employed local FDR approximation is only valid for reasonably sized
## number of elements of A (say) at least p > 10 and,
## consequently, a vector of 100 regression coefficients.
## plot non-null structure of A
edgeHeat(Anullornot)Run the code above in your browser using DataLab