mre
Calculates the mean absolute relative error
Contents
Syntax
[merr rerr] = mre(func, p, varargin)
Description
Calculates the mean absolute relative error, used in add_my_pet
Input
- func: character string with name of user-defined function; see nrregr
- p: (np,nc) matrix with p(:,1) parameter values
- xywi: (ni,3) matrix with
xywi(:,1) independent variable
xywi(:,2) dependent variable
xywi(:,3) weight coefficients (optional)
The number of data matrices xyw1, xyw2, ... is optional
The first data matrix is assumed to be zero-variate,
the others uni-variate, which are first reduced to zero-variate data
if all weight coefficients in a uni-variate data-set are zero,
that relative error gets weight zeroOutput
- merr: scalar with mean absolute relative error
- rerr: vector with absolute relative errors