comparison rDiff/src/locfit/m/gcv.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 g=gcv(varargin)
2
3 fit = locfit(varargin{:});
4 rs = rsum(fit);
5
6 df0 = rs(1);
7 df1 = rs(2);
8 llk = rs(3);
9 n = size(fit.data.x,1);
10 gc = -2*n*llk/((n-df0)^2);
11 g = [llk df0 df1 gc];
12
13 return;