adaptive_poet_rho: Adaptive Selection of the Shrinkage Parameter rho for POET

View source: R/localPOET.R

adaptive_poet_rhoR Documentation

Adaptive Selection of the Shrinkage Parameter \rho for POET

Description

This function selects an optimal shrinkage parameter \rho for the residual covariance estimation procedure. It does so by dividing the data into groups and comparing a shrunk covariance matrix (computed on one subsample) to a benchmark covariance (computed on another subsample) using the Frobenius norm. The candidate \rho that minimizes the total squared Frobenius norm difference is selected.

Usage

adaptive_poet_rho(
  R,
  M0 = 10,
  rho_grid = seq(0.001, 2, length.out = 20),
  epsilon2 = 1e-06
)

Arguments

R

A numeric matrix of data (e.g., residuals) with dimensions T × p, where T is the number of observations and p is the number of variables.

M0

Integer. The number of observations to leave out between two subsamples when forming groups. Default is 10.

rho_grid

A numeric vector of candidate shrinkage parameters \rho. Default is seq(0.001, 2, length.out = 20).

epsilon2

A small positive tuning parameter used as an adjustment in the selection of \rho. Default is 1e-6.

Details

The function proceeds as follows:

  1. The total number of observations T is halved to define T_1 and T_2. Specifically:

    T_1 = \left\lfloor \frac{T}{2} \times \left(1 - \frac{1}{\log(T)}\right) \right\rfloor

    T_2 = \left\lfloor \frac{T}{2} \right\rfloor - T_1

  2. The sample is divided into \left\lfloor T/(2M_0) \right\rfloor groups (with M_0 observations left out in between).

  3. For each group, two subsamples are defined:

    • Subsample 1: the first T_1 observations of the group.

    • Subsample 2: the last T_2 observations of the group, after skipping M_0 observations following subsample 1.

  4. For each group and a given candidate \rho in rho_grid, the covariance matrix S_1 is computed from subsample 1, and then shrunk using soft-thresholding:

    S_{1,\text{shrunk}} = \text{soft\_threshold}\left(S_1, \rho \times \text{mean}\left(|S_1|_{\text{off-diag}}\right)\right)

  5. The total squared Frobenius norm between S_{1,\text{shrunk}} and the covariance matrix S_2 (from subsample 2) is computed across all groups.

  6. The function scans rho_grid to find the \rho minimizing total error. Additionally, it computes \rho_1 as \epsilon_2 plus the smallest \rho for which the smallest eigenvalue of the shrunk covariance is positive.

Value

A list containing:

  • best_rho: The selected optimal shrinkage parameter \hat{\rho} that minimizes the total squared Frobenius norm difference.

  • rho_1: The lower bound for \rho derived from the minimum eigenvalue criteria (adjusted by epsilon2).

  • min_Fnorm: The minimum total squared Frobenius norm difference achieved.


TVMVP documentation built on June 28, 2025, 1:08 a.m.