R/MSE.R

Defines functions MSE

Documented in MSE

#Mean Squared Error
MSE <- function(model) {
  if(class(model)=="lm"){
    return(mean(model$residuals^2))
  }
  if(class(model)=="numeric"){
    return(mean(model^2))
  }
}
CRG180/NPSOR documentation built on June 3, 2021, 4:37 a.m.