R/costmse.R

#' @title cost.mse
#' @description mse
#' @export cost.mse
#' @return Mean Square Error
#' @param y Response
#' @param yhat The predicted value

cost.mse <- function(y, yhat)
{
    mean((y - yhat)^2)
}

Try the freestats package in your browser

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

freestats documentation built on May 2, 2019, 1:18 p.m.