diff rDiff/src/locfit/m/aic.m @ 0:0f80a5141704

version 0.3 uploaded
author vipints
date Thu, 14 Feb 2013 23:38:36 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rDiff/src/locfit/m/aic.m	Thu Feb 14 23:38:36 2013 -0500
@@ -0,0 +1,14 @@
+function g=aic(varargin)
+
+pen = 2.0;
+
+fit = locfit(varargin{:});
+rs = rsum(fit);
+
+df0 = rs(1);
+df1 = rs(2);
+llk = rs(3);
+ai = -2*llk + pen * df0;
+g = [llk df0 df1 ai];
+
+return;