[R] Prediction method for lowess,loess,lokerns,lpepa,ksmooth

Gavin Simpson gavin.simpson at ucl.ac.uk
Tue Feb 7 16:04:08 CET 2006


On Tue, 2006-02-07 at 06:24 -0800, Amir Safari wrote:
>   
>   Hi Every Body,
>   I don't know why some regression functions have no related
> prediction  function. For example lowess, loess, lokerns, lpridge,
> lpepa, and  ksmooth.
>   What could help? Is there any global or wrapper function so that can
> help?
>   Regards,
>   Amir Safari

loess() /does/ have a predict method [7]:

> methods("predict")
 [1] predict.ar*                predict.Arima*
 [3] predict.arima0*            predict.glm
 [5] predict.HoltWinters*       predict.lm
 [7] predict.loess*             predict.mlm
 [9] predict.nls*               predict.poly
[11] predict.ppr*               predict.prcomp*
[13] predict.princomp*          predict.smooth.spline*
[15] predict.smooth.spline.fit* predict.StructTS*

   Non-visible functions are asterisked

The other functions (except ksmooth) I can't find in base R 2.2.1-
patched, so they are likely from contributed packages. As such, you
should contact the package maintainers for help, to make a feature
request, or offer your help in writing predict methods for these
functions.

?ksmooth states:

Note:

     This function is implemented purely for compatibility with S,
     although it is nowhere near as slow as the S function. Better
     kernel smoothers are available in other packages.

So perhaps you could look in the contributed packages section of the
CRAN website for something that meets your needs?

HTH

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list