
The function generates parameters for different types of edges based on the graph.
pargen(adjmat, p, q, a, b, c)
A m x m adjacency matrix (m is the number of total variables). The program automatically check whether the matrix is symmetric and positive.
The number of continous variables.
The number of binary variables.
Control overall magnitude of the non-zero parameters for edges connecting continuous variables.
Control overall magnitude of the non-zero parameters for edges connecting binary and continuous variables.
Control overall magnitude of the non-zero parameters for edges connecting binary variables.
The function returns a paramter list.
In order to generate simulation data, first generate the parameters. Once the adjacency matrix is given, we set all parameters corresponding to absent edges to 0. For the non-zero parameters, we set lambda
j, lambda
jk, eta
j to be positive or negative with equal probability and the absolute value of each
non-zero eta
j is drawn from the uniform distribution on the interval (0.9a, 1.1a) and each non-zero lambda
j or lambda
jk is from (0.9c,1.1c).
The program makes sure that all the probability values are not negative.
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
# NOT RUN {
## set controlling parameters
p = 20
q = 10
a = 1
b = 2
c = 1
# set adjacency matrix
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))
#generate list
parlist = pargen(adj, p, q, a, b,c)
# }
Run the code above in your browser using DataLab