getCluster {HGMND} | R Documentation |
After estimating the conditional dependence matrices of the multiple datasets using the HGMND method, the cluster structure can be revealed by comparison of these matrices.
getCluster(est.HGMND, method = "F", tol = 1e-5)
est.HGMND |
a list, the result of the function |
method |
the method of evaluating the difference of two conditional dependence matrices. The function |
tol |
tolerance in evaluating the difference of two conditional dependence matrices. If the calculated difference is no larger than |
the function getCluster
returns the clustering structure of the multiple conditional dependence matrices.
mat.comapre |
a matrix of 0 or 1. If the element on the |
est.cluster |
a vector with length same as the number of conditional dependence matrices indicating the cluster label of each matrix. |
# This is an example of HGMND with simulated data
data(HGMND_SimuData)
h <- genscore::get_h_hp("mcp", 1, 5)
HGMND_SimuData <- lapply(HGMND_SimuData, function(x) scale(x, center = FALSE))
mat.chain <- diag(length(HGMND_SimuData))
diag(mat.chain[-nrow(mat.chain), -1]) <- 1
result <- HGMND(x = HGMND_SimuData,
setting = "gaussian",
h = h,
centered = FALSE,
mat.adj = mat.chain,
lambda1 = 0.086,
lambda2 = 3.6,
gamma = 1,
tol = 1e-3,
silent = TRUE)
Theta <- result[["Theta"]]
res.cluster <- getCluster(result)