qpK2R {qpgraph} | R Documentation |
Obtains partial correlation coefficients from a given concentration matrix.
qpK2R(K)
K |
concentration matrix. |
Partial correlation coefficients are obtained from a concentration matrix by scaling it by its diagonal and swapping the sign of the off-diagonal elements.
A matrix with partial correlation coefficients.
R. Castelo and A. Roverato
Castelo, R. and Roverato, A. A robust procedure for Gaussian graphical model search from microarray data with p larger than n. J. Mach. Learn. Res., 7:2621-2650, 2006.
nVar <- 50 # number of variables maxCon <- 5 # maximum connectivity per variable I <- qpRndGraph(n.vtx=nVar, n.bd=maxCon) K <- qpI2K(I) R <- qpK2R(K) # true partial correlation coefficients of the present edges summary(abs(R[upper.tri(R) & I])) # true partial correlation coefficients of the missing edges summary(abs(R[upper.tri(R) & !I]))