Package 'DNetFinder'

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

Help Index


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.

Details

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

Author(s)

Qingyang Zhang

Maintainer: Qingyang Zhang <[email protected]>

References

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.

See Also

lassoGGM(), lassoNPN(), DNetGGM(), DNetNPN()

Examples

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)

Testing for the structural difference between two GGMs

Description

The function "DNetGGM" tests for the structural difference between two Gaussian graphical models with false discovery rate control.

Usage

DNetGGM(Data_mat1,Data_mat2,Beta_mat1,Beta_mat2,alpha)

Arguments

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 Beta_mat1 for details.

alpha

User-specified FDR level

Details

The multiple testing procedure asymptotically controls the false discovery rate. See Liu (2017) for details.

Value

Estimated differential network, where "1" represents a differential edge and "0" represents a common edge (or no edge) between two GGMs.

Note

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).

Author(s)

Qingyang Zhang

References

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.

See Also

DNetNPN()

Examples

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)

Testing for the structural difference between two NPNGMs

Description

The function "DNetNPN" tests for the structural difference between two nonparanormal graphical models with false discovery rate control.

Usage

DNetNPN(Data_mat1,Data_mat2,Beta_mat1,Beta_mat2,alpha)

Arguments

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 Beta_mat1 for details.

alpha

User-specified FDR level

Details

The multiple testing procedure asymptotically controls the false discovery rate. See Zhang (2017) for details.

Value

Estimated differential network, where "1" represents a differential edge and "0" represents a common edge (or no edge) between two NPNGMs.

Note

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).

Author(s)

Qingyang Zhang

References

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.

See Also

DNetGGM()

Examples

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)

Estimating the regression coefficients in GGMs with lasso

Description

The function "lassoGGM" computes the lasso estimates of the regression coefficents in GGMs for constructing the test statistic.

Usage

lassoGGM(Data_mat)

Arguments

Data_mat

A n by p data matrix, where each row represents one observation

Details

The tuning parameter in the lasso regression is chosen as in Liu (2017).

Value

The estimated coefficient matrix by lasso

Note

Other estimators such as Dantzig selector or square-root lasso can also be used. See detailed discussion in Liu (2017) and Zhang (2017).

Author(s)

Qingyang Zhang

References

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.

See Also

lassoNPN()

Examples

Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE)
est_coefGGM=lassoGGM(Data1)

Estimating the regression coefficients in NPNGMs with lasso

Description

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.

Usage

lassoNPN(Data_mat)

Arguments

Data_mat

A n by p data matrix, where each row represents one observation

Details

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.

Value

Estimated coefficients matrix by lasso

Note

Other estimators such as Dantzig selector or square-root lasso can also be used. See detailed discussion in Liu (2017) and Zhang (2017).

Author(s)

Qingyang Zhang

References

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.

See Also

lassoGGM()

Examples

Data1=read.table(system.file("extdata","Data1.txt",package="DNetFinder"),header=FALSE)
est_coefNPN=lassoNPN(Data1)