Generic function returning the scores for a covariance kernel object.
scores(object, ...)
A numeric vector of length npar(object)
containing the scores.
A covariance object.
Other arguments passed to methods.
Compute the derivatives \(\partial_{\theta_k}\ell \) for the (possibly concentrated) log-likelihood \(\ell := \log L\) of a covariance object with parameter vector \(\boldsymbol{\theta}\). The score for \(\theta_k\) is obtained as a matrix scalar product $$ \partial_{\theta_k} \ell = \textrm{trace}(\mathbf{W} \mathbf{D}) $$ where \(\mathbf{D} := \partial_{\theta_k} \mathbf{C}\) and where \(\mathbf{W}\) is the matrix \( \mathbf{W} := \mathbf{e}\mathbf{e}^\top - \mathbf{C}^{-1} \). The vector \(\mathbf{e}\) is the vector of residuals and the matrix \(\mathbf{C}\) is the covariance computed for the design \(\mathbf{X}\).