lib/quadratic-loss.R

####################################################
#      
#      file: quadratic-loss.R
#      author: Tayler Blake
#
#      inputs: omegaHat - an estimated inverse 
#                         covariance matrix
#              Sig    - the true covariance matrix
#
#      output: quadratic_loss - non-negative loss 
#                             measure
#
####################################################


quadratic_loss <- function(omegaHat, Sig) {
      I_hat <- omegaHat%*%Sig
      sum(diag(I_hat)^2)
}
taylerablake/thin-plate-splines documentation built on Sept. 19, 2017, 9:45 a.m.