dot-compute_hat_diag: Compute the Diagonal of the Tuning Hat Matrix

.compute_hat_diagR Documentation

Compute the Diagonal of the Tuning Hat Matrix

Description

Computes the per-observation diagonal of the constrained hat matrix used during tuning, without forming the full N \times N matrix.

Usage

.compute_hat_diag(X, G, A, AGAInv, K, p_expansions, eps = 1e-07)

Arguments

X

List of partition-specific design matrices.

G

List of partition-specific \mathbf{G}_k matrices.

A

Constraint matrix.

AGAInv

Inverse of \mathbf{A}^{\top}\mathbf{G}\mathbf{A}.

K

Number of interior knots.

p_expansions

Number of columns per partition.

eps

Numeric floor used to keep 1 - h_{ii} away from zero.

Value

List with h_diag and C_list, both partition-wise.


lgspline documentation built on May 8, 2026, 5:07 p.m.