% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HelperFunctions.R
\name{.compute_dhat_diag}
\alias{.compute_dhat_diag}
\title{Compute the Derivative of the Tuning Hat Matrix Diagonal}
\usage{
.compute_dhat_diag(X, G, dG_dlambda, A, AGAInv, K, p_expansions)
}
\arguments{
\item{X}{List of partition-specific design matrices.}

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

\item{dG_dlambda}{List of derivatives \eqn{d\mathbf{G}_k / d\lambda_1}.}

\item{A}{Constraint matrix.}

\item{AGAInv}{Inverse of \eqn{\mathbf{A}^{\top}\mathbf{G}\mathbf{A}}.}

\item{K}{Number of interior knots.}

\item{p_expansions}{Number of columns per partition.}
}
\value{
List with \code{dh_diag} and \code{dC_list}, both partition-wise.
}
\description{
Computes \eqn{d h_{ii} / d\lambda_1} partition-wise for the exact
leave-one-out tuning criterion.
}
\keyword{internal}
