comparison rDiff/src/locfit/m/scb.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 z=scb(x,y,varargin)
2
3 % Simultaneous Confidence Bands
4 %
5 % Example:
6 % load ethanol;
7 % z = scb(E,NOx,'h',0.5);
8 %
9 % result (z) is a matrix with four columns: evaluation points,
10 % fitted values, lower confidence limit, upper confidence limit.
11 % Most locfit arguments should work.
12
13 fit = locfit(x,y,'ev','grid','mg',20,varargin{:});
14 kap = kappa0(x,y,varargin{:});
15 cb = predict(fit,'fitp','band','g','kappa',kap);
16 z = [fit.fit_points.evaluation_points' cb{1} cb{3}];
17
18 return;