Re: [R] Smoothing Techniques - short stepwise functions with spikes

2010-05-11 Thread Liaw, Andy
> [mailto:r-help-boun...@r-project.org] On Behalf Of Ralf B > Sent: Tuesday, May 11, 2010 3:17 AM > To: r-help@r-project.org > Subject: [R] Smoothing Techniques - short stepwise functions > with spikes > > R Friends, > > I have data from which I would like to learn

Re: [R] Smoothing Techniques - short stepwise functions with spikes

2010-05-11 Thread Gabor Grothendieck
This removes runs of length 1 and 2. It replaces the values in any such run with NA and then uses na.locf from the zoo package to fill those NA's by carrying forward the last occurrence of a non-NA. In this example the run consisting of a single 2, the run consisting of two 3's and the run consi

Re: [R] Smoothing Techniques - short stepwise functions with spikes

2010-05-11 Thread Tal Galili
Hi Ralf, I can't offer you many resources, but the few I came across are: 1) loess (or the older version: lowess) 2) smooth 3) rollapply (from the zoo pacakge) I used a combination of 1 and 3 when creating an R implementaion for a (simplistic) quantile loess, you might find the code useful: http:

[R] Smoothing Techniques - short stepwise functions with spikes

2010-05-11 Thread Ralf B
R Friends, I have data from which I would like to learn a more general (smoothened) trend by applying data smoothing methods. Data points follow a positive stepwise function. |x x | | xx |xx