Description Usage Arguments Value Author(s) References See Also Examples
Function to obtain the adjascent matrix by thresholding the adj norm matrix
1 | fitadj(adj_norm, thres)
|
adj_norm |
A structure with adj norm matrix zz zy yy |
thres |
Length of thresholding vector |
The function returns a 4-dimentional array to record the adj matrix.
Mingyu Qi, Tianxi Li
Jie Cheng, Tianxi Li, Elizaveta Levina, and Ji Zhu. (2017) High-dimensional Mixed Graphical Models. Journal of Computational and Graphical Statistics 26.2: 367-378, https://arxiv.org/pdf/1304.2810.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 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)
adj_lambda = fitadj(adj_norm, 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.