search for: fits4foo

Displaying 1 result from an estimated 1 matches for "fits4foo".

2003 Aug 14
2
Using spline parameters to generate data
...* exp(-0.01 * 1:500) + 0.5 ts.plot(foo.curve, lwd = 2) # Another sample looks not unlike this: foo.curve2 <- 0.9 * exp(-0.02 * 1:500) + 0.5 ts.plot(foo.curve2, lwd = 2) # They can be fit with splines easily like so: ts.plot(foo.curve, lwd = 2) spline.model <- smooth.spline(foo.curve) fits4foo <- predict(spline.model)$y spline4foo <- spline(1:500, fits4foo) lines(spline4foo$x, spline4foo$y, col = "red", lwd = 2, lty = "dashed") # I originally generated the data I needed by using a nls model and # adding some noise to the mean of the coefficents from those fits...