R/foremeas1.R

Defines functions foremeas1

Documented in foremeas1

foremeas1 <- function(actx,forex) {
#actx is the actual, while forex is the forecast
#we will return MSE and MAE
if(length(actx)!=length(forex))stop("inputs have different lengths")
mse1 <- mean((forex-actx)^2)
mae1 <- mean(abs(forex-actx))
fore1 <- list(MSE=mse1,MAE=mae1)
return(fore1)
}

Try the disagg2 package in your browser

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

disagg2 documentation built on April 12, 2025, 1:47 a.m.