Learn R Programming

cxreg (version 1.0.0)

cglasso.path: fit a complex-valued graphical Lasso for a path of lambda values

Description

Fit a complex-valued graphical Lasso formulation for a path of lambda values. cglasso.path solves the penalized Gaussian maximum likelihood problem for a path of lambda values.

Usage

cglasso.path(
  S,
  D,
  type,
  nobs,
  lambda,
  nlambda,
  lambda.min.ratio,
  W.init,
  stopping_rule,
  stop_criterion,
  maxit = maxit,
  thresh = thresh,
  trace.it = trace.it,
  ...
)

Value

An object with class "cglassofit" and "cglasso".

a0

Intercept sequence of length length(lambda).

beta

A nvar x length(lambda) matrix of coefficients, stored in sparse matrix format.

df

The number of nonzero coefficients for each value of lambda.

dim

Dimension of coefficient matrix.

lambda

The actual sequence of lambda values used. When alpha=0, the largest lambda reported does not quite give the zero coefficients reported (lambda=inf would in principle). Instead, the largest lambda for alpha=0.001 is used, and the sequence of lambda values is derived from this.

dev

The fraction of (null) deviance explained. The deviance calculations incorporate weights if present in the model. The deviance is defined to be 2*(loglike_sat - loglike), where loglike_sat is the log-likelihood for the saturated model (a model with a free parameter per observation). Hence dev=1-dev/nulldev.

nulldev

Null deviance (per observation). This is defined to be 2*(loglike_sat -loglike(Null)). The null model refers to the intercept model.

npasses

Total passes over the data summed over all lambda values.

jerr

Error flag, for warnings and errors (largely for internal debugging).

call

The call that produced this object.

family

Family used for the model.

nobs

Number of observations.

#' @return An object with class "cglassofit" and "cglasso".

stop_arr

Sequence of values of information criterion for a fixed lambda.

stop_criterion

Stopping criterion used.

min_index

The index for lambda that minimizes the value of the information criterion.

lambda_grid

Sequence of lambdas used.

Theta_hat

Estimated inverse spectral matrix for each fixed lambda. It is provided in the list.

type

Type of the formulation used, either CGALSSO-I or CGLASSO-II.

scale

Whether the spectral density matrix (covariance) or spectral coherence (coherence) is given.

D

Used scale diagonal matrix.

Arguments

S

p x p-dimensional symmetric spectral density (or spectral coherence) matrix. S is considered as being computed by average smoothed periodogram (the bandwidth is computed by using the given nobs).

D

The p x p-dimensional diagonal matrix with spectral densities as the diagonal entries. Default is NULL. If D is not provided, diagonals of S are chosen.

type

Logical flag to choose the formulation to solve. Default is I. If type is I, the algorithm solves CGLASSO-I in the reference, $$D^{-1/2}(\arg\min_{\Theta}Tr[\hat{R}\hat{\Theta}]-\log\det\Theta + \sum_{i\neq j}|\Theta_{ij}|)D^{-1/2}$$ for the given $D$. If type is II, the algorithm solves CGLASSO-II in the reference. It is for each iterative classo with covariate update, the scale matrix D is multiplied. Please see the reference for the details of the iterative updates.

nobs

Number of observations used in computation of the spectral density matrix S. This quantity is need to compute the Fourier frequency, extended BIC, and bandwidth for the average smoothed periodogram.

lambda

A user supplied lambda sequence. Typical usage is to have the program compute its own lambda sequence based on nlambda and lambda.min.ratio. Supplying a value of lambda overrides this. WARNING: use with care. Avoid supplying a single value for lambda

nlambda

The number of lambda values - default is 50.

lambda.min.ratio

Smallest value for lambda, as a fraction of lambda.max, the (data derived) entry value (i.e. the smallest value for which all coefficients are zero). The default depends on the sample size nobs relative to the number of variables nvar. If nobs > p, the default is 0.0001, close to zero. If nobs < p, the default is 0.01.

W.init

Logical flag whether the initially estimated spectral density matrix is given. Default is NULL.

stopping_rule

Logical flag if the algorithm is terminated by stopping rule. If the algorithm is early terminated, not all estimates for initially designated lambdas are explored.

stop_criterion

Stopping criterion for early termination. Default is EBIC (Extended BIC). Alternatively, AIC (AIC) and RMSE (root mean squared error between two consecutive estimates) can be used.

maxit

Maximum number of iterations of both outer and inner loops. Default 500.

thresh

Convergence threshold for coordinate descent. Default is 1e-4.

trace.it

If trace.it=1, then a progress bar is displayed; useful for big models that take a long time to fit.

...

Other arguments that can be passed to cglasso