Learn R Programming

FluxPoint (version 0.1.2)

estimatePhinu_nondiag: Estimate non-diagonal VAR(1) parameters after mean removal

Description

Estimates the non-diagonal autoregressive coefficient matrix \(\Phi\) and innovation covariance matrix \(\Sigma_{\boldsymbol{\nu}}\) for the residual process obtained after removing the estimated fluctuating mean from the data. The estimation applies the Lasso to encourage sparsity in the cross-variable dependence structure.

Usage

estimatePhinu_nondiag(
  epsilons,
  Sig_nu_diag,
  Phi_diag,
  replace_diag = FALSE,
  needReproduce = FALSE
)

Value

A list containing:

  • `Phi_hat` — Estimated non-diagonal autoregressive matrix \(\Phi\).

  • `Sig_nu_hat` — Estimated non-diagonal innovation covariance matrix \(\Sigma_{\boldsymbol{\nu}}\).

Arguments

epsilons

Numeric matrix of dimension \(n \times p\), representing the estimated residuals \(\boldsymbol{\epsilon}_t = \mathbf{y}_t - \hat{\boldsymbol{\mu}}_t\).

Sig_nu_diag

Numeric \(p \times p\) diagonal matrix providing initial (diagonal) estimates of \(\Sigma_{\boldsymbol{\nu}}\).

Phi_diag

Numeric \(p \times p\) diagonal matrix providing initial (diagonal) estimates of \(\Phi\).

replace_diag

Logical; if TRUE, replaces the diagonal entries of the estimated matrices with those from Sig_nu_diag and Phi_diag (default FALSE).

needReproduce

Logical; if TRUE, uses fixed fold assignments in cross-validation to ensure reproducibility (default FALSE).

Details

The function applies a Lasso-penalized VAR(1) fit to the residual process \(\boldsymbol{\epsilon}_t\) to estimate cross-dependencies among variables. The fitting is performed using the function fitVAR(), which is adapted from the sparsevar package. When replace_diag = TRUE, the diagonal entries of \(\Phi\) and \(\Sigma_{\boldsymbol{\nu}}\) are replaced by their componentwise estimates obtained in Phase I for improved numerical stability.