# NOT RUN {
n = 100
p = 20
q = 10
a = 1
b= 2
c = 1
adj = matrix(0, p+q, p+q)
adj[10:16, 10:16] = 1
adj[1:5, 1:5] = 1
adj[25:30, 25:30] = 1
adj = adj-diag(diag(adj))
parlist = pargen(adj, p, q, a, b,c)
mydata = datagen(parlist, n)
z = mydata$z
y = mydata$y
tune1 = tune2 = 0.1
kappa = 0.1
## parameter estimation
fit = hmgm(z, y, tune1, tune2, 'max', kappa)
##calculate the group L2 norm for each pair of edges
fitlist_post = fit$fitlist_post
adj_norm = edgenorm(fitlist_post)
# }
Run the code above in your browser using DataLab