annotate rDiff/src/locfit/m/residuals.m @ 1:08d3a6143873

Deleted selected files
author vipints
date Tue, 08 Oct 2013 06:54:25 -0400
parents 0f80a5141704
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
1 function y = residuals(fit,type)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
2
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
3 % Residuals (or a few other things) from a locfit() fit.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
4 %
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
5 % Input arguments:
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
6 % fit - the locfit() fit.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
7 % type (optional) type of residuals. Valid types are
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
8 % 'dev' (deviance, the default)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
9 % 'd2' (deviance squared)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
10 % 'pearson'(Pearson)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
11 % 'raw' (observed - fitted)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
12 % 'ldot' (derivative of log-likelihood)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
13 % 'lddot' (second derivative)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
14 % 'fit' (fitted values - no transformation)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
15 % 'mean' (fitted values - with back transformation)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
16 %
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
17 % Author: Catherine Loader.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
18
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
19 if (nargin<2) type = 'dev'; end;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
20
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
21 y = predict(fit,'d','restyp',type);
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
22
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
23 return;