Provide a collection of statistical methods to estimate a precision matrix.
Usage
fcstat(
X,
method,
base = "cov",
n = NULL,
lambda = NULL,
nlambda = 20,
lambda.min.ratio = 0.01,
gamma = NA,
initial = "glasso",
pkgopt = "glassoFast_cold_diagture",
crit = "CV",
fold = 5,
ebic.tuning = 0.5,
cores = 1
)
Arguments
- X
An n-by-p data matrix with sample size n and dimension p.
A p-by-p sample covariance/correlation matrix with dimension p.
- method
A character string specifying the statistical method for estimating precision matrix. Available options include:
"glasso": graphical lasso friedman2008sparsefcstat.
"ridge": graphical ridge vanwieringen2016ridgefcstat.
"elnet": graphical elastic net zou2005regularizationfcstat.
"clime": constrained L1-minimization for inverse (covariance) matrix estimation cai2011aconstrainedfcstat.
"tiger": tuning-insensitive graph estimation and regression liu2017tigerfcstat, which is only applicable when
X
is the n-by-p data matrix."adapt": adaptive lasso zou2006adaptive,fan2009networkfcstat.
"atan": arctangent type penalty wang2016variablefcstat.
"exp": exponential type penalty wang2018variablefcstat.
"mcp": minimax concave penalty zou2006adaptivefcstat.
"scad": smoothly clipped absolute deviation fan2001variable,fan2009networkfcstat.
- base
A character string (default = "cov") specifying the calculation base, either the covariance matrix ("cov") or the correlation matrix ("cor"). This is only applicable when
X
is the n-by-p data matrix.- n
An integer (default = NULL) specifying the sample size. This is only required when the input matrix
X
is a p-by-p sample covariance/correlation matrix with dimension p.- lambda
Grid of non-negative scalars for the regularization parameter. The default is
NULL
, which generates its ownlambda
sequence based onnlambda
andlambda.min.ratio
.- nlambda
An integer (default = 20) specifying the number of
lambda
values to be generated whenlambda = NULL
.- lambda.min.ratio
A scalar (default = 0.01) specifying the fraction of the maximum
lambda
value \(\lambda_{max}\) to generate the minimumlambda
\(\lambda_{min}\). Iflambda = NULL
, the program automatically generates alambda
grid as a sequence of lengthnlambda
in log scale, starting from \(\lambda_{min}\) to \(\lambda_{max}\).- gamma
Grid of scalars specifying the hyperparameter for the chosen
method
. Default values:"elnet": a sequence from 0.1 to 0.9 with increments of 0.1
"adapt": 0.5
"atan": 0.005
"exp": 0.01
"scad": 3.7
"mcp": 3
- initial
A p-by-p matrix or a p-by-p-by-npara (the number of all combinations of
lambda
andgamma
) array specifying the initial estimate formethod
set to"atan"
,"exp"
,"scad"
, and"mcp"
; or specifying \(\tilde{\Omega}\) of the adaptive weight formethod = "adapt"
, calculated as \(|\tilde{\omega}_{ij}|^{-\gamma}\), where \(\tilde{\Omega} := (\tilde{\omega}_{ij})\). Some options are also offered when a character string is provided (default "linshrink"), including:"glasso": use the precision matrix estimate derived from the graphical lasso.
"invS": use the inverse calculation base matrix if the matrix is invertible.
"linshrink": use the precision matrix estimate derived from Ledoit-Wolf linear shrinakge estimator of the population covariance matrix ledoit2004wellfcstat.
"nlshrink": use the precision matrix estimate derived from Ledoit-Wolf non-linear shrinakge estimator of the population covariance matrix ledoit2015spectrum,ledoit2017numericalfcstat.
- pkgopt
A character string specifying the package option to use. The available options depend on the selected method:
For
method = "glasso"
:"ADMMsigma_diagtrue": the function from
ADMMsigma
with warm-starts, and the diagonal elements of the estimated precision matrix are penalized."ADMMsigma_diagfalse": the function from
ADMMsigma
with warm-starts, and the diagonal elements of the estimated precision matrix are not penalized."CovTools": the function from
PreEst.glasso
."CVglasso_diagtrue": the function from
CVglasso
with warm-starts, and the diagonal elements of the estimated precision matrix are penalized."CVglasso_diagfalse": the function from
CVglasso
with warm-starts, and the diagonal elements of the estimated precision matrix are not penalized."glasso_cold_diagtrue": the function from
glasso
, and the diagonal elements of the estimated precision matrix are penalized."glasso_cold_diagfalse": the function from
glasso
, and the diagonal elements of the estimated precision matrix are not penalized."glasso_warm_diagtrue": the function from
glasso
with warm-starts, and the diagonal elements of the estimated precision matrix are penalized."glasso_warm_diagfalse": the function from
glasso
with warm-starts, and the diagonal elements of the estimated precision matrix are not penalized."GLassoElnetFast_cold_diagtrue": the function from gelnet, and the diagonal elements of the estimated precision matrix are penalized.
"GLassoElnetFast_cold_diagfalse": the function from gelnet, and the diagonal elements of the estimated precision matrix are not penalized.
"GLassoElnetFast_warm_diagtrue": the function from gelnet with warm-starts, and the diagonal elements of the estimated precision matrix are penalized.
"GLassoElnetFast_warm_diagfalse": the function from gelnet with warm-starts, and the diagonal elements of the estimated precision matrix are not penalized.
"glassoFast_cold": the function from
glassoFast
, and the diagonal elements of the estimated precision matrix are penalized."glassoFast_warm": the function from
glassoFast
with warm-starts, and the diagonal elements of the estimated precision matrix are penalized."huge": the function from
huge.glasso
, and the diagonal elements of the estimated precision matrix are penalized.
For
method = "ridge"
:"ADMMsigma": the function from
RIDGEsigma
."GLassoElnetFast": the function from gelnet.
"porridge": the function from
ridgePgen
."rags2ridges": the function from
ridgeP
.
For
method = "elnet"
:For
method = "clime"
:For
method = "tiger"
:"flare": the function from
sugm
."huge": the function from
huge.tiger
.
For
method
set to"adapt"
,"atan"
,"exp"
,"scad"
, and"mcp"
:"glasso_cold": the function from
glasso
."glasso_warm": the function from
glasso
with warm-starts."GLassoElnetFast_cold": the function from gelnet.
"GLassoElnetFast_warm": the function from gelnet with warm-starts.
"glassoFast_cold": the function from
glassoFast
."glassoFast_warm": the function from
glassoFast
with warm-starts.
- crit
A string (default = "CV") specifying the parameter selection method to use. Available options include:
"AIC": Akaike information criterion akaike1973informationfcstat.
"BIC": Bayesian information criterion schwarz1978estimatingfcstat.
"EBIC": extended Bayesian information criterion foygel2010extendedfcstat.
"HBIC": high dimensional Bayesian information criterion wang2013calibrating,fan2017highfcstat.
"CV": k-fold cross validation with negative log-likelihood loss.
- fold
An integer (default = 5) specifying the number of folds used for
crit = "CV"
.- ebic.tuning
A scalar (default = 0.5) specifying the tuning parameter to calculate for
crit = "EBIC"
.- cores
An integer (default = 1) specifying the number of cores to use for parallel execution.
Value
For
crit = "CV"
, an object with S3 class "fcstat" containing the following components:- hatOmega_opt
The estimated precision matrix.
- lambda_opt
The optimal regularization parameter.
- gamma_opt
The optimal hyperparameter.
- loss_opt
The optimal k-fold loss.
- hatOmega
A list of estimated precision matrices for
lambda
grid andgamma
grid.- lambda
The actual lambda grid used in the program.
- gamma
The actual gamma grid used in the program.
- loss.mean
The mean of k-fold loss for each parameter grid value.
- loss.sd
The standard deviation of k-fold loss for each parameter grid value.
For other criteria, an object with S3 class "fcstat" containing the following components:
- hatOmega_opt
The estimated precision matrix.
- lambda_opt
The optimal regularization parameter.
- gamma_opt
The optimal hyperparameter.
- score_opt
The optimal information criterion score.
- hatOmega
A list of estimated precision matrices for
lambda
grid andgamma
grid.- lambda
The actual lambda grid used in the program.
- gamma
The actual gamma grid used in the program.
- score
The information criterion score for each parameter grid value.