mre_st
calculates the mean absolute relative error
Contents
Syntax
[merr, rerr, prdInfo] = mre_st(func, par, data, auxData, weights)
Description
Calculates the mean absolute relative error for each data set, used in add_my_pet. Contributions of errors for pseudo data are excluded from the overall mean relative error.
Input
- func: character string with name of user-defined predict_my_pet function
- par: structure with parameters
- data: structure with data
- auxData: structure with data
- weights: structure with weights for the data
Output
- merr: scalar with mean absolute relative error
- rerr: (n-2) matrix with weighted relative error of each of data set in first column and 1 or 0 in the second column indicated whether or not the data set was given weight zero
- prdInfo: boolean with success (1) or failure (0) for call to predict-function
Remarks
Bi-variate data can have NaN's (= missing data). Uni- and bi-variate data have the (first) independent variable in the first column First output merr excludes contributions from pseudo-data.