Computing single H matrix in AICc-function using the Mahalanobis distance
hat_matrix_cpp(X, mcov, S_scale_dist, h)
X
: matrix.mcov
: matrix The covariance matrix of X.S_scale_dist
: logical. Indicating whether the Mahalanobis distance should be scaled with the number of variablesh
: numeric specifying the scaling (sigma)Matrix of dimension ncol(X)*ncol(X)
Martin Jullum
Useful links