# NOT RUN {
# set dimensions
p <- 3
n <- 4
T <- 10
# set model parameters
SigmaE <- diag(p)/4
A <- matrix(c(-0.1, -0.3, 0.6, 0.5, -0.4, 0, 0.3, -0.5, -0.2),
byrow=TRUE, ncol=3)
# 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
# }
# NOT RUN {
Anullornot <- matrix(0, p, p)
# }
# NOT RUN {
Anullornot[sparsifyVAR1(VAR1hat$A, solve(VAR1hat$P),
threshold="localFDR")$nonzeros] <- 1
# }
# NOT RUN {
## 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
# }
# NOT RUN {
edgeHeat(Anullornot)
# }
Run the code above in your browser using DataLab