Matlab version added 6/2006.
Model Formula, smoothing parameters (12/2004)
I'm changing the way that the LOCFIT
model formula, and the smoothing parameters, are specified.
In particular, the predictor variables should be wrapped in
the lp() function. Smoothing parameters, such as
alpha and deg, are now given to lp(),
instead of directly to locfit.raw().
Note also that the cryptic specification of alpha has been split into three arguments of lp(): nn (the nearest neighbor component); h (the constant component) and adpen (the adaptive penalty). The defaults are nn=0.7,h=0,adpen=0; however, if either h or adpen is provided, then nn defaults to 0.
Some examples:
> fit <- locfit(NOx~lp(E,nn=0.5)) # smooth with 50% nn bandwidth. > fit <- locfit(NOx~lp(E,h=0.2,deg=1)) # local linear with constant h=0.2 > fit <- locfit(NOx~lp(E,C)) # bivariate smooth.For now, only a single lp() term (and nothing else) should be given on the RHS.
The old specification will continue to (mostly) work for now, although I don't promise to maintain this in the future.
Evalution Structures (11/2004)
The way that evaluation structures are specified in a
LOCFIT call has changed. Each
evaluation structure now has an associated generator function.
So, for example, the old command
> fit <- locfit(NOx~E,data=ethanol,ev="grid",mg=20,flim=c(0.6,0.8))would now be specified as
> fit <- locfit(NOx~lp(E),data=ethanol,ev=gr(mg=20,ll=0.6,ur=0.8))
The available generator functions are
Function names (12/2004)
knots() has been renamed lfknots(), due to a
conflict with the R function of the same name.