mb) (2) graphical lasso (glasso) and (3) correlation thresholding graph estimation (ct), are available for data analysis.huge(x, lambda = NULL, nlambda = NULL, lambda.min.ratio = NULL, method = "mb", scr = NULL, scr.num = NULL, cov.output = FALSE, sym = "or", verbose = TRUE)x is an n by d data matrix (2) a d by d sample covariance matrix. The program automatically identifies the input matrix by checking the symmetry. (n is method = "mb" or "glasso", or the thresholding in method = "ct". Typical usage is to leave the input lambda = NULL and have the30 for method = "ct" and 10 for method = "mb" or "glasso".method = "mb" or "glasso", it is the smallest value for lambda, as a fraction of the uppperbound (MAX) of the regularization/thresholding parameter which makes all estimates equal to 0. T"mb", "ct" and "glasso". The defaulty value is "mb".scr = TRUE, the lossy screening rule is applied to preselect the neighborhood before the graph estimation. The default value is FALSE. NOT applicable when method = "ct".scr = TRUE. The default value is n-1. An alternative value is n/log(n). ONLY applicable when cov.output = TRUE, the output will inlcude a path of estimated covariance matrices. ONLY applicable when method = "glasso". Since the estimated covariance matrices are generally not sparse, please use it with care, or it may tsym = "and", the edge between node i and node j is selected ONLY when both node i and node j are selected as neighbors for each other. If sym = "or"verbose = FALSE, tracing information printing is disabled. The default value is TRUE."huge" is returned:n by d data matrix or d by d sample covariance matrix from the inputscr.num by k matrix with each column correspondsing to a variable in ind.group and contains the indices of the remaining neighbors after the GSS. ONLY applicable when scr = TRUE and approx = FALSEsym from the input. ONLY applicable when method = "mb".scr from the input. ONLY applicable when method = "mb" or {"glasso"}.k by k adjacency matrices of estimated graphs as a graph path corresponding to lambda.d by d precision matrices as an alternative graph path (numerical path) corresponding to lambda. ONLY applicable when {method = "glasso"}d by d estimated covariance matrices corresponding to lambda. ONLY applicable when cov.output = TRUE and {method = "glasso"}method = "mb", it is a k by nlambda matrix. Each row contains the number of nonzero coefficients along the lasso solution path. If method = "glasso", it is a nlambda dimensional vector containing the number of nonzero coefficients along the graph path icov.nlambda dimensional vector containing the likelihood scores along the graph path (icov). ONLY applicable when method = "glasso". For an estimated inverse convariance Z, the program only calculates log(det(Z)) - trace(SZ) where S is the empirical covariance matrix. For the likelihood for n observations, please multiply by n/2.huge.generator, huge.select, huge.plot, huge.roc, and huge-package.#generate data
L = huge.generator(n = 200, d = 80, graph = "hub")
#graph path estimation using mb
out1 = huge(L$data)
out1
plot(out1) #Not aligned
plot(out1, align = TRUE) #Aligned
huge.plot(out1$path[[3]])
#graph path estimation using the sample covariance matrix as the input.
out1 = huge(cor(L$data))
out1
plot(out1) #Not aligned
plot(out1, align = TRUE) #Aligned
huge.plot(out1$path[[3]])
#graph path estimation using ct
out2 = huge(L$data,method = "ct")
out2
plot(out2)
#graph path estimation using glasso
out3 = huge(L$data, method = "glasso")
out3
plot(out3)Run the code above in your browser using DataLab