Description Usage Arguments Details Value Author(s) References See Also Examples
Test whether an element of the precision matrix is zero, using the graphical lasso to approximate the parameters in remainder of the precision matrix.
1 2 |
x |
data matrix. Unlike glasso, this function requires the original data, not just the covariance matrix. |
lambda |
a non-negative tuning parameter |
subset |
An ncol(x) by ncol(x) logical matrix, giving a subset of edges to test. |
penalize.diagonal |
logical. Whether or not to penalize the diagonal in the graphical lasso. Defaults to FALSE. |
tol |
convergence tolerance for glasso or glmnet |
... |
for mbscore, additional arguments to be passed to lassoscore |
This function tests for pairwise association between features, using the graphical lasso (glassoscore) or neighborhood selection (mbscore). Tests are based on the penalized score statistic T_λ, described in Voorman et al (2014). Note that a feature is non-zero in the (graphical) lasso solution if and only if
| T_λ | > λ √ n,
where T_λ is penalized the score statistic.
Calculating the variance of T_λ can be computationally expensive for glassoscore. If there are q non-zero parameters in the graphical lasso solution, it will (roughly) require construction, and inversion, of a q x q matrix for each of the q non-zero parameters. That is, complexity is roughly q^4.
For mbscore, the results are typically not symmetric. For instance, p.sand[-i,i] contains the p-values produced by lassoscore(x[,i],x[,-i],lambda)
, i.e. using x[,i] as the outcome variable, and thus p.sand[i,-i] contains p-values associated with feature i when used as the a predictor variable.
for an object of class either ‘glassoscore’ or ‘mbscore’, containing
scores |
the penalized score statistics |
scorevar.model |
the variance of the score statistics, estimated using a model-based variance estimate |
scorevar.sand |
the variance of the score statistcs, using a conservative variance estimate |
p.model |
p-value, using the model-based variance |
p.sand |
p-value, using the sandwich variance |
beta |
for mbscore, the beta[-i,i] contains the coefficients from lasso regression of x[,i] on x[,-i]. |
In addition, glassoscore contains the output from ‘glasso’ applied to x.
Arend Voorman
Jerome Friedman, Trevor Hastie and Robert Tibshirani (2007). Sparse inverse covariance estimation with the lasso. Biostatistics 2007. http://www-stat.stanford.edu/~tibs/ftp/graph.pdf
N. Meinshausen and P. Buhlmann. High-dimensional graphs and variable selection with the lasso. Annals of Statistics, 34(3):1436-1462, 2006.
lassoscore, glasso
1 2 3 4 5 6 7 8 9 10 |
Loading required package: glasso
Loading required package: glmnet
Loading required package: Matrix
Loading required package: foreach
Loaded glmnet 2.0-12
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.