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

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to