Prediction method for lowess,loess,lokerns,lpepa,ksmooth

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Prediction method for lowess,loess,lokerns,lpepa,ksmooth

Amir Safari

 
  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
 
                       
---------------------------------

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Prediction method for lowess,loess,lokerns,lpepa,ksmooth

Gavin Simpson
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.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Prediction method for lowess,loess,lokerns,lpepa,ksmooth

Frank Harrell
In reply to this post by Amir Safari
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
>  
>
> ---------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

This is somewhat related to what you want.  In the Hmisc package look at
the areg.boot function.

--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: Prediction method for lowess,loess,lokerns,lpepa,ksmooth

Prof Brian Ripley
In reply to this post by Gavin Simpson
On Tue, 7 Feb 2006, Gavin Simpson wrote:

> 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?

However, the _only_ thing kernel smoothing does is prediction. As in

  range.x: the range of points to be covered in the output.

n.points: the number of points at which to evaluate the fit.

x.points: points at which to evaluate the smoothed fit. If missing,
           'n.points' are chosen uniformly to cover 'range.x'.

I would suggest rather using packages KernSmooth (ships with R) or sm.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html