For a fixed design without intercept, returns the degrees of freedom
\(\sum_{j \in \hat S} (A_k)_{jj}\), with
\(A_k = (X^T X + k I)^{-1} X^T X\), and the unbiased estimate of the
prediction risk \(E\|X\hat\theta - X\beta\|^2\) for fixed tuning and known error variance.
Plug-in variance estimates or tuning by minimizing SURE do not retain that guarantee. When
intercept = TRUE the design and response are centred and one
degree of freedom is added for the intercept.
Arguments
- X
design matrix.
- y
response.
- sigma2
error variance (known or estimated).
- k
ridge parameters.
- gamma
thresholds.
- intercept
logical.
- standardize
logical.
- scale
Fixed positive numeric scale of the slope fit. Intercept df remains one. These formulas do not apply to a scale estimated from the same response.