smooth_lf

PURPOSE ^

must (unlike R smooth.lf() function) give x and y.

SYNOPSIS ^

function z=smooth_lf(x,y,varargin)

DESCRIPTION ^

 must (unlike R smooth.lf() function) give x and y.
 also R's direct=T is automatic.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function z=smooth_lf(x,y,varargin)
0002 
0003 % must (unlike R smooth.lf() function) give x and y.
0004 % also R's direct=T is automatic.
0005 %
0006 
0007 xev = x;
0008 if (k>1)
0009   if (strcmp(varargin{1},'xev'))
0010     xev = varargin{2};
0011     varargin(1:2) = [];
0012   end;
0013 end;
0014 fit = locfit(x,y,varargin{:},'ev',xev,'module','simple');
0015 z = lfknots(fit);
0016 fv = invlink(z(:,1),fit.fit_points.family_link);
0017 
0018 z = { xev, fv };
0019 
0020 return;

Generated on Fri 12-Aug-2011 11:36:15 by m2html © 2005