[R] need help with smooth.spline

Liaw, Andy andy_liaw at merck.com
Thu Mar 4 02:47:46 CET 2004


If you really want interpolation, should you be using spline() rather than
smooth.spline()?  The later is for smoothing data observed with noise, not
for interpolation.

Andy

> From: W. C. Thacker
> 
> Dear R listers,
> 
> When using smooth.spline to interpolate data, results are generally
> good.  However, some cases produce totally unreasonable results.
> 
> The data are values of pressure, temperature, and salinity from a
> probe that is lowered into the ocean, and the objective is to
> interpolate temperature and salinity to specified pressures.  While
> smooth.spline provides excellent values at the observed pressures,
> there are cases when the values at the desired pressures are
> unusable.  A dataframe with four such profiles, indicated by values of
> id, is attached.  My target values for pressure are seq(25,1600,25),
> but 1:500 is also interesting.  
> 
> Setting all.knots = TRUE helps, but it would be nice to be able to do
> better.
> 
> Any suggestions?
> 
> Thanks,
> 
> Carlisle
> 
> > version
>          _                   
> platform sparc-sun-solaris2.9
> arch     sparc               
> os       solaris2.9          
> system   sparc, solaris2.9   
> status                       
> major    1                   
> minor    8.0                 
> year     2003                
> month    10                  
> day      08                  
> language R                   
> 
> 
> -- 
> 
> William Carlisle Thacker                            
>                                                     
> Atlantic Oceanographic and Meteorological Laboratory
> 4301 Rickenbacker Causeway, Miami, Florida 33149 USA
> Office: (305) 361-4323           Fax: (305) 361-4392
> 
> "Too many have dispensed with generosity 
>      in order to practice charity."     Albert Camus
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}




More information about the R-help mailing list