Package 'lglasso'

Title: Longitudinal Graphical Lasso
Description: For high-dimensional correlated observations, this package carries out the L_1 penalized maximum likelihood estimation of the precision matrix (network) and the correlation parameters. The correlated data can be longitudinal data (may be irregularly spaced) with dampening correlation or clustered data with uniform correlation. For the details of the algorithms, please see the paper Jie Zhou et al. Identifying Microbial Interaction Networks Based on Irregularly Spaced Longitudinal 16S rRNA sequence data <doi:10.1101/2021.11.26.470159>.
Authors: Jie Zhou [aut, cre, cph], Jiang Gui [aut], Weston Viles [aut], Anne Hoen [aut]
Maintainer: Jie Zhou <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2025-02-17 04:45:21 UTC
Source: https://github.com/jiezhou-2/lglasso

Help Index


Graphical Lasso for Longitudinal Data

Description

This function implements the L_1 penalized maximum likelihood estimation for precision matrix (network) based on correlated data, e.g., irregularly spaced longitudinal data. It can be regarded as an extension of the package glasso (Friedman,Hastie and Tibshirani, 2008) which aims to find the sparse estimate of the network from independent continuous data.

Usage

lglasso(
  data,
  x = NULL,
  rho,
  heter = TRUE,
  type = 1,
  tole = 0.01,
  lower = 0.01,
  upper = 10
)

Arguments

data

Data matrix in which the first column is subject id, the second column is time points of observations for temporal data or site id for spatial data. Columns 3 to (p+2) is the observations for p variables.

rho

Tuning parameter used in L_1 penalty

heter

Binary variable TRUE or FALSE, indicating heterogeneous model or homogeneous model is fitted. In heterogeneous model, subjects are allowed to have his/her own temporal correlation parameter tau_i; while in homogeneous model, all the subjects are assumed to share the same temporal correlation parameter,i.e., tau_1=tau_2=...tau_m.

type

A positive number which specify the correlation function. The general form of correlation function is given by exp(tau|t_i-t_j|^type). in which type=0 can be used for spatial correlation while type>0 are used for temporal correlation. For latter, the default value is set to be type=1.

tole

Threshold for convergence. Default value is 1e-2. Iterations stop when maximum absolute difference between consecutive estimates of parameter change is less than tole.

lower

Lower bound for predicts of correlation parameter tau. Default value is 1e-2. The estimate of tau(alpha) will be searched in the interval [lower,upper], where parameter upper is explained in the following.

upper

Upper bound for predicts of correlation parameter tau.

Value

If heter=TRUE, then a list with three components is returned which are respectively the estimate of parameter alpha in exponent distribution, correlation parameter tau and precision matrix omega. If heter=FALSE, then a list with two components is returned which are respectively the estimate of correlation parameter tau and precision matrix omega.

Author(s)

Jie Zhou

References

Jie Zhou, Jiang Gui, Weston D.Viles, Anne G.Hoen Identifying Microbial Interaction Networks Based on Irregularly Spaced Longitudinal 16S rRNA sequence data. bioRxiv 2021.11.26.470159; doi: https://doi.org/10.1101/2021.11.26.470159

Friedman J, Tibshirani TH and R. Glasso: Graphical Lasso: Estimation of Gaussian Graphical Models.; 2019. Accessed November 28, 2021. https://CRAN.R-project.org/package=glasso

Friedman J, Hastie T, Tibshirani TH, Sparse inverse covariance estimation with the graphical lasso, Biostatistics, Volume 9, Issue 3, July 2008, Pages 432–441, https://doi.org/10.1093/biostatistics/kxm045


Maximum Likelihood Estimate of Precision Matrix and Correlation Parameters for Given Network

Description

Maximum Likelihood Estimate of Precision Matrix and Correlation Parameters for Given Network

Usage

mle(
  data,
  x = NULL,
  network,
  heter = TRUE,
  type = 1,
  tole = 0.01,
  lower = 0.01,
  upper = 10
)

Arguments

data

Data matrix in which the first column is subject id, the second column is time points of observations for temporal data or site id for spatial data. Columns 3 to (p+2) is the observations for p variables.

network

The network selected by function lglasso

heter

Binary variable TRUE or FALSE, indicating heterogeneous model or homogeneous model is fitted. In heterogeneous model, subjects are allowed to have his/her own temporal correlation parameter tau_i; while in homogeneous model, all the subjects are assumed to share the same temporal correlation parameter,i.e., tau_1=tau_2=...tau_m.

type

A positive number which specify the correlation function. The general form of correlation function is given by exp(tau|t_i-t_j|^type). in which type=0 can be used for spatial correlation while type>0 are used for temporal correlation. For latter, the default value is set to be type=1.

tole

Threshold for convergence. Default value is 1e-2. Iterations stop when maximum absolute difference between consecutive estimates of parameter change is less than tole.

lower

Lower bound for predicts of correlation parameter tau. Default value is 1e-2. The estimate of tau(alpha) will be searched in the interval [lower,upper], where parameter upper is explained in the following.

upper

Upper bound for predicts of correlation parameter tau.

Value

A list which include the maximum likelihood estimate of precision matrix, correlation parameter tau. If heter=TRUE, the output also include the estimate of alpha where tau~exp(alpha)

Author(s)

Jie Zhou