adaptive_poet_rho | R Documentation |
\rho
for POETThis 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.
adaptive_poet_rho(
R,
M0 = 10,
rho_grid = seq(0.001, 2, length.out = 20),
epsilon2 = 1e-06
)
R |
A numeric matrix of data (e.g., residuals) with dimensions |
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 |
epsilon2 |
A small positive tuning parameter used as an adjustment in the selection of |
The function proceeds as follows:
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
The sample is divided into \left\lfloor T/(2M_0) \right\rfloor
groups (with M_0
observations left out in between).
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.
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)
The total squared Frobenius norm between S_{1,\text{shrunk}}
and the covariance matrix S_2
(from subsample 2) is computed across all groups.
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.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.