R/mse.R

"mse" <-
function(x,y){
  if (length(x)!=length(y)) stop("MSE: the lenghts of input vectors must be the same.")
  mse <- 1/length(x) * sum((x-y)^2)
  return(round(mse,5))
}

Try the hapsim package in your browser

Any scripts or data that you put into this service are public.

hapsim documentation built on May 1, 2019, 9:11 p.m.