[R] Spline - frequency response (again)
Dr Carbon
drcarbon at gmail.com
Wed Jul 18 20:14:10 CEST 2007
Is it really possible that nobody can help me with this? Is r-help too
overwhelmed now? Any help appreciated - Jon
On 7/16/07, Dr Carbon <drcarbon at gmail.com> wrote:
> Please preemptively excuse my ignorance.
>
> I'm trying to fit a cubic smoothing spline to a time series according to a method encountered in a paper. The authors state that they fit a spline whose frequency response is 50% at a wavelength of n years where n is 67% of the length of the time series. Is it possible to fit a spline like this in R using the spar parameter in smooth.spline? Or is there another spline function in R that works with frequency response?
>
> The time series I need to fit is similar to this:
> ts.sim <- arima.sim(list(ar=c(0.5873,0.0873,0.1332,0.0746,-0.0794, 0.0953,0.0313,-0.1393,0.0401,0.2226,0.0024,-0.1030)), n = 350, sd = 0.02)
>
> I believe the spline I want to fit will look not unlike this (could be wrong):
> ts.plot(ts.sim)
> lines(smooth.spline(ts.sim,spar=0.75)$y,col='red',lwd=2)
>
> Can anybody help with this implementation.
>
> TIA, JC
>
>
>
More information about the R-help
mailing list