sparse.tscgm {SparseTSCGM}R Documentation

Sparse time series chain graphical models

Description

Computes sparse vector autoregressive coefficients matrices of order 1 and order 2 and precision matrix estimates for time series chain graphical models using SCAD penalty. In time series chain graphs directed edges are identified by nonzero entries of the autoregressive coefficients matrix and undirected edges are identified by nonzero entries of the precision matrix.

Usage

sparse.tscgm(data = data, lam1 = NULL, lam2 = NULL, nlambda = NULL, 
      model = c("ar1", "ar2"), penalty=c("scad","lasso"),
      optimality = c("NULL", "bic", "bic_ext", "bic_mod", "aic", "gic"), 
      control = list())

Arguments

data

Longitudinal data format.

lam1

Either a scalar or a vector of tuning parameter values for the SCAD penalty on the precision matrix. The default is lam1=NULL and the program generates a sequence of tuning parameter values based on nlambda. The user can also specify a sequence to change the default sequence. If lam1 is a vector with length at least 2, information criteria based model selection will be performed to select the optimal tuning parameter.

lam2

Either a scalar or a vector of tuning parameter values for the SCAD penalty on the precision matrix. The default is lam2=NULL and the program generates a sequence of tuning parameter values based on nlambda. The user can also specify a sequence to chance the default sequence. If lam2 is a vector with length at least 2, information criteria based model selection will be performed to select the optimal tuning parameter.

nlambda

The number of values used in lam1 and lam2. Default value is 10.

model

This specifies the order of vector autoregressive models. Vector autoregressive model of order 1 is applied if model = "ar1" and Vector autoregressive model of order 2 is applied if method = "ar2".

penalty

This specifies the type of penalty function uto be used. SCAD penalty function is applied if penalty = "scad" and GLASSO is applied if penalty = "lasso".

optimality

This specifies the type of information based model selection criteria. When optimality is "NULL" it computes the time series chain graphical model solutions for specified scalar values of the tuning parameters lam1 and lam2. The rest optimality criteria first selects the optimal SCAD tuning parameter values using the minimum information criterion from vectors of tuning parameters for lam1 and lam2 then computes the time series chain graphical model solutions based on the optimal tuning parameter values. These are: "BIC" (Bayesian Information Criteria), "bic_ext" (Extended Bayesian Information Criteria), "bic_mod" (Modified Bayesian Information Criteria) "aic" (Akakie Information Criteria), and "gic" (Generalized Information Criteria).

control

The argument control includes a list of control parameters passed to the main function. The user can specify its own control parameter values to replace the default values.

control = list(maxit.out = 5, maxit.in = 50, tol.out = 1e-04, silent = TRUE)

maxit.out : The maximum allowable outer iterations of the algorithm. The outer-loop iterates alternatively to estimate the precision matrix and the autoregression matrix until convergence. Default is 5. maxit.in: The maximum allowable iterations of the algorithm that minimizes with respect to the autoregression coefficient matrix. Default is 50. tol.out: Convergence tolerance for outer-loop of the algorithm that alternate between the estimation of precision matrix and autoregressive coefficients matrix.Default is 1e-04. silent: Either TRUE or FALSE. If silent=FALSE this function will display progress updates to the screen. Default is TRUE.

Details

For description of the objective functions and computational details see Abegaz and Wit (2013).

Value

A list containing:

theta

Precision matrix estimate. The nonzero estimates of the precision matrix are used for constructing undirected graphs that represent conditional independences at time lag 0 or instantaneous interactions.

gamma

Autoregressive coefficients matrix estimate. The nonzero estimates of the autoregression matrix are used for constructing directed graphs that represent conditional independences at time lag 1, time lag 2 or dynamic interactions.

lam1.opt

The optimal tuning parameter for SCAD penalty on the precision matrix selected with minimum information criterion.

lam2.opt

The optimal tuning parameter for SCAD penalty on the autoregressive coefficients matrix selected with minimum BIC criterion.

min.ic

Minimum value of the optimality criterion.

tun.ic

A matrix containing the list of tuning parameter values and the corresponding model selection or optimality values.

lam1.seq

The sequence of tuning parameter values related to precision matrix.

lam2.seq

The sequence of tuning parameter values related to autoregression matrix.

s.theta

Sparsity level of the precision matrix.

s.gamma

Sparsity level of the autoregression coefficients matrix.

Author(s)

Fentaw Abegaz and Ernst Wit

References

Fentaw Abegaz and Ernst Wit (2013). Sparse time series chain graphical models for reconstructing genetic networks. Biostatistics. 14, 3: 586-599.

Rothman, A.J., Levina, E., and Zhu, J. (2010). Sparse multivariate regression with covariance estimation. Journal of Computational and Graphical Statistics. 19: 947–962.

Examples


seed = 321
datas <- sim.data(model="ar1", time=10,n.obs=10, n.var=5,seed=seed,prob0=0.35,
         network="random")
data.fit <-  datas$data1
prec_true <- datas$theta
autoR_true <- datas$gamma
    
   
res.tscgm <- sparse.tscgm(data=data.fit, lam1=NULL, lam2=NULL, nlambda=NULL, 
 model="ar1", penalty="scad",optimality="bic_mod",control=list(maxit.out = 10, maxit.in = 100))
   
#Estimated sparse precision and autoregression matrices
prec <- res.tscgm$theta
autoR <- res.tscgm$gamma

#Optimal tuning parameter values
lambda1.opt <- res.tscgm$lam1.opt
lambda2.opt <- res.tscgm$lam2.opt

#Sparsity levels
sparsity_theta <- res.tscgm$s.theta
sparsity_gamma <- res.tscgm$s.gamma

#Graphical visualization
oldpar <- par(mfrow=c(2,2))
plot.tscgm(datas, mat="precision",main="True precision matrix")         
plot.tscgm(res.tscgm, mat="precision",main="Estimated precision matrix")     
plot.tscgm(datas, mat="autoregression",main="True autoregression coef. matrix")     
plot.tscgm(res.tscgm, mat="autoregression",
             main="Estimated autoregression coef. matrix") 
par(oldpar)


[Package SparseTSCGM version 4.0 Index]