Title: | Estimating Differential Networks under Semiparametric Gaussian Graphical Models |
---|---|
Description: | Provides a modified hierarchical test (Liu (2017) <doi:10.1214/17-AOS1539>) for detecting the structural difference between two Semiparametric Gaussian graphical models. The multiple testing procedure asymptotically controls the false discovery rate (FDR) at a user-specified level. To construct the test statistic, a truncated estimator is used to approximate the transformation functions and two R functions including lassoGGM() and lassoNPN() are provided to compute the lasso estimates of the regression coefficients. |
Authors: | Qingyang Zhang |
Maintainer: | Qingyang Zhang <[email protected]> |
License: | GPL-3 |
Version: | 1.1 |
Built: | 2024-11-21 06:29:38 UTC |
Source: | CRAN |
Provides a modified hierarchical test (Liu (2017) <doi:10.1214/17-AOS1539>) for detecting the structural difference between two Semiparametric Gaussian graphical models. The multiple testing procedure asymptotically controls the false discovery rate (FDR) at a user-specified level. To construct the test statistic, a truncated estimator is used to approximate the transformation functions and two R functions including lassoGGM() and lassoNPN() are provided to compute the lasso estimates of the regression coefficients.
Index of help topics:
DNetFinder-package Estimating Differential Networks under Semiparametric Gaussian Graphical Models DNetGGM Testing for the structural difference between two GGMs DNetNPN Testing for the structural difference between two NPNGMs lassoGGM Estimating the regression coefficients in GGMs with lasso lassoNPN Estimating the regression coefficients in NPNGMs with lasso
Qingyang Zhang
Maintainer: Qingyang Zhang <[email protected]>
Li, X., Zhao, T., Yuan, X., Liu, H. (2015). The flare Package for High Dimensional Linear Regression and Precision Matrix Estimation in R. Journal of Machine Learning Research, 16:553-557
Liu, H., Lafferty, J., Wasserman, L. (2009). The Nonparanormal: Semiparametric Estimation of High Dimensional Undirected Graphs. Journal of Machine Learning Research, 10:2295-2328
Liu, W. (2017). Structural Similarity and Difference Testing on Multiple Sparse Gaussian Graphical Models. Annals of Statistics, 45(6):2680-2707
Tibshirani, R. (1996). Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society Series B, 58(1):267-288
Zhang, Q. (2017). Structural Difference Testing on Multiple Nonparanormal Graphical Models with False Discovery Rate Control. Preprint.
lassoGGM(), lassoNPN(), DNetGGM(), DNetNPN()
library(flare) library(DNetFinder) Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) Data2=read.table(system.file("extdata","Data2.txt",package="DNetFinder"),header=FALSE) BetaGGM1=read.table(system.file("extdata","BetaGGM1.txt",package="DNetFinder"),header=FALSE) BetaGGM2=read.table(system.file("extdata","BetaGGM2.txt",package="DNetFinder"),header=FALSE) BetaNPN1=read.table(system.file("extdata","BetaNPN1.txt",package="DNetFinder"),header=FALSE) BetaNPN2=read.table(system.file("extdata","BetaNPN2.txt",package="DNetFinder"),header=FALSE) est_coefGGM=lassoGGM(Data1) est_coefNPN=lassoNPN(Data1) est_DNGGM=DNetGGM(Data1,Data2,BetaGGM1,BetaGGM2,alpha=0.1) est_DNNPN=DNetNPN(Data1,Data2,BetaNPN1,BetaNPN2,alpha=0.1)
library(flare) library(DNetFinder) Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) Data2=read.table(system.file("extdata","Data2.txt",package="DNetFinder"),header=FALSE) BetaGGM1=read.table(system.file("extdata","BetaGGM1.txt",package="DNetFinder"),header=FALSE) BetaGGM2=read.table(system.file("extdata","BetaGGM2.txt",package="DNetFinder"),header=FALSE) BetaNPN1=read.table(system.file("extdata","BetaNPN1.txt",package="DNetFinder"),header=FALSE) BetaNPN2=read.table(system.file("extdata","BetaNPN2.txt",package="DNetFinder"),header=FALSE) est_coefGGM=lassoGGM(Data1) est_coefNPN=lassoNPN(Data1) est_DNGGM=DNetGGM(Data1,Data2,BetaGGM1,BetaGGM2,alpha=0.1) est_DNNPN=DNetNPN(Data1,Data2,BetaNPN1,BetaNPN2,alpha=0.1)
The function "DNetGGM" tests for the structural difference between two Gaussian graphical models with false discovery rate control.
DNetGGM(Data_mat1,Data_mat2,Beta_mat1,Beta_mat2,alpha)
DNetGGM(Data_mat1,Data_mat2,Beta_mat1,Beta_mat2,alpha)
Data_mat1 |
An n1 by p data matrix for the first GGM, where each row represents one observation |
Data_mat2 |
An n2 by p data matrix for the second GGM, where each row represents one observation |
Beta_mat1 |
A p-1 by p coefficient matrix for the first GGM, where each column contains the regression coefficients of one variable on the other p-1 variables. |
Beta_mat2 |
A p-1 by p coefficient matrix for the second GGM. See |
alpha |
User-specified FDR level |
The multiple testing procedure asymptotically controls the false discovery rate. See Liu (2017) for details.
Estimated differential network, where "1" represents a differential edge and "0" represents a common edge (or no edge) between two GGMs.
Besides lasso, other estimators such as Dantzig selector or square-root lasso can also be used. See detailed discussion in Liu (2017) and Zhang (2017).
Qingyang Zhang
Li, X., Zhao, T., Yuan, X., Liu, H. (2015). The flare Package for High Dimensional Linear Regression and Precision Matrix Estimation in R. Journal of Machine Learning Research, 16:553-557
Liu, H., Lafferty, J., Wasserman, L. (2009). The Nonparanormal: Semiparametric Estimation of High Dimensional Undirected Graphs. Journal of Machine Learning Research, 10:2295-2328
Liu, W. (2017). Structural Similarity and Difference Testing on Multiple Sparse Gaussian Graphical Models. Annals of Statistics, 45(6):2680-2707
Tibshirani, R. (1996). Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society Series B, 58(1):267-288
Zhang, Q. (2017). Structural Difference Testing on Multiple Nonparanormal Graphical Models with False Discovery Rate Control. Preprint.
DNetNPN()
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) Data2=read.table(system.file("extdata","Data2.txt",package="DNetFinder"),header=FALSE) BetaGGM1=read.table(system.file("extdata","BetaGGM1.txt",package="DNetFinder"),header=FALSE) BetaGGM2=read.table(system.file("extdata","BetaGGM2.txt",package="DNetFinder"),header=FALSE) est_DNGGM=DNetGGM(Data1,Data2,BetaGGM1,BetaGGM2,alpha=0.1)
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) Data2=read.table(system.file("extdata","Data2.txt",package="DNetFinder"),header=FALSE) BetaGGM1=read.table(system.file("extdata","BetaGGM1.txt",package="DNetFinder"),header=FALSE) BetaGGM2=read.table(system.file("extdata","BetaGGM2.txt",package="DNetFinder"),header=FALSE) est_DNGGM=DNetGGM(Data1,Data2,BetaGGM1,BetaGGM2,alpha=0.1)
The function "DNetNPN" tests for the structural difference between two nonparanormal graphical models with false discovery rate control.
DNetNPN(Data_mat1,Data_mat2,Beta_mat1,Beta_mat2,alpha)
DNetNPN(Data_mat1,Data_mat2,Beta_mat1,Beta_mat2,alpha)
Data_mat1 |
An n1 by p data matrix for the first NPNGM, where each row represents one observation |
Data_mat2 |
An n2 by p data matrix for the second NPNGM, where each row represents one observation |
Beta_mat1 |
A p-1 by p coefficient matrix for the first NPNGM, where each column contains the regression coefficients of one variable on the other p-1 variables. |
Beta_mat2 |
A p-1 by p coefficient matrix for the second NPNGM. See |
alpha |
User-specified FDR level |
The multiple testing procedure asymptotically controls the false discovery rate. See Zhang (2017) for details.
Estimated differential network, where "1" represents a differential edge and "0" represents a common edge (or no edge) between two NPNGMs.
Besides lasso, other estimators such as Dantzig selector or square-root lasso can also be used. See detailed discussion in Liu (2017) and Zhang (2017).
Qingyang Zhang
Li, X., Zhao, T., Yuan, X., Liu, H. (2015). The flare Package for High Dimensional Linear Regression and Precision Matrix Estimation in R. Journal of Machine Learning Research, 16:553-557
Liu, H., Lafferty, J., Wasserman, L. (2009). The Nonparanormal: Semiparametric Estimation of High Dimensional Undirected Graphs. Journal of Machine Learning Research, 10:2295-2328
Liu, W. (2017). Structural Similarity and Difference Testing on Multiple Sparse Gaussian Graphical Models. Annals of Statistics, 45(6):2680-2707
Tibshirani, R. (1996). Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society Series B, 58(1):267-288
Zhang, Q. (2017). Structural Difference Testing on Multiple Nonparanormal Graphical Models with False Discovery Rate Control. Preprint.
DNetGGM()
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) Data2=read.table(system.file("extdata","Data2.txt",package="DNetFinder"),header=FALSE) BetaNPN1=read.table(system.file("extdata","BetaNPN1.txt",package="DNetFinder"),header=FALSE) BetaNPN2=read.table(system.file("extdata","BetaNPN2.txt",package="DNetFinder"),header=FALSE) est_DNNPN=DNetNPN(Data1,Data2,BetaNPN1,BetaNPN2,alpha=0.1)
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) Data2=read.table(system.file("extdata","Data2.txt",package="DNetFinder"),header=FALSE) BetaNPN1=read.table(system.file("extdata","BetaNPN1.txt",package="DNetFinder"),header=FALSE) BetaNPN2=read.table(system.file("extdata","BetaNPN2.txt",package="DNetFinder"),header=FALSE) est_DNNPN=DNetNPN(Data1,Data2,BetaNPN1,BetaNPN2,alpha=0.1)
The function "lassoGGM" computes the lasso estimates of the regression coefficents in GGMs for constructing the test statistic.
lassoGGM(Data_mat)
lassoGGM(Data_mat)
Data_mat |
A n by p data matrix, where each row represents one observation |
The tuning parameter in the lasso regression is chosen as in Liu (2017).
The estimated coefficient matrix by lasso
Other estimators such as Dantzig selector or square-root lasso can also be used. See detailed discussion in Liu (2017) and Zhang (2017).
Qingyang Zhang
Li, X., Zhao, T., Yuan, X., Liu, H. (2015). The flare Package for High Dimensional Linear Regression and Precision Matrix Estimation in R. Journal of Machine Learning Research, 16:553-557
Liu, H., Lafferty, J., Wasserman, L. (2009). The Nonparanormal: Semiparametric Estimation of High Dimensional Undirected Graphs. Journal of Machine Learning Research, 10:2295-2328
Liu, W. (2017). Structural Similarity and Difference Testing on Multiple Sparse Gaussian Graphical Models. Annals of Statistics, 45(6):2680-2707
Tibshirani, R. (1996). Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society Series B, 58(1):267-288
Zhang, Q. (2017). Structural Difference Testing on Multiple Nonparanormal Graphical Models with False Discovery Rate Control. Preprint.
lassoNPN()
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) est_coefGGM=lassoGGM(Data1)
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) est_coefGGM=lassoGGM(Data1)
The function "lassoNPN" computes the lasso estimates of the regression coefficents in NPNGMs for constructing the test statistic. The regression is based on a truncated (Winsorized) estimator for the transformation functions in NPNGMs.
lassoNPN(Data_mat)
lassoNPN(Data_mat)
Data_mat |
A n by p data matrix, where each row represents one observation |
The tuning parameter in the lasso regression is chosen as in Liu (2017). The truncation parameter in the Winsorized estimator is chosen as in Liu et al. (2009) to well balance the variance and bias.
Estimated coefficients matrix by lasso
Other estimators such as Dantzig selector or square-root lasso can also be used. See detailed discussion in Liu (2017) and Zhang (2017).
Qingyang Zhang
Li, X., Zhao, T., Yuan, X., Liu, H. (2015). The flare Package for High Dimensional Linear Regression and Precision Matrix Estimation in R. Journal of Machine Learning Research, 16:553-557
Liu, H., Lafferty, J., Wasserman, L. (2009). The Nonparanormal: Semiparametric Estimation of High Dimensional Undirected Graphs. Journal of Machine Learning Research, 10:2295-2328
Liu, W. (2017). Structural Similarity and Difference Testing on Multiple Sparse Gaussian Graphical Models. Annals of Statistics, 45(6):2680-2707
Tibshirani, R. (1996). Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society Series B, 58(1):267-288
Zhang, Q. (2017). Structural Difference Testing on Multiple Nonparanormal Graphical Models with False Discovery Rate Control. Preprint.
lassoGGM()
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) est_coefNPN=lassoNPN(Data1)
Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE) est_coefNPN=lassoNPN(Data1)