ssq
Calculates sum of squared deviations for univariate data
Contents
Syntax
ss = ssq (func, p, varargin)
Description
Calculates sum of squared deviations of model predictions with respect to observations
Input
- func: character string with name of user-defined function see nrregr
- p: (r,k) matrix with parameter values in p(1,:)
- Xi: (ni,3) matrix with
Xi(:,1) independent variable Xi(:,2) weight coefficients Xi(:,3) dependent variable The number of data matrices X1, X2, ... is optional
Ouput
- ss: scalar with weighted sum of squared deviations
Example of use
assuming that function_name, pars, and xyw1 (and possibly more data matrices) are defined properly: ssq('function_name', pars, xyw1, xyw2, ...).