comparison rDiff/src/locfit/m/residuals.m @ 0:0f80a5141704

version 0.3 uploaded
author vipints
date Thu, 14 Feb 2013 23:38:36 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0f80a5141704
1 function y = residuals(fit,type)
2
3 % Residuals (or a few other things) from a locfit() fit.
4 %
5 % Input arguments:
6 % fit - the locfit() fit.
7 % type (optional) type of residuals. Valid types are
8 % 'dev' (deviance, the default)
9 % 'd2' (deviance squared)
10 % 'pearson'(Pearson)
11 % 'raw' (observed - fitted)
12 % 'ldot' (derivative of log-likelihood)
13 % 'lddot' (second derivative)
14 % 'fit' (fitted values - no transformation)
15 % 'mean' (fitted values - with back transformation)
16 %
17 % Author: Catherine Loader.
18
19 if (nargin<2) type = 'dev'; end;
20
21 y = predict(fit,'d','restyp',type);
22
23 return;