polynom {RTisean} | R Documentation |
This programs models a time series making a polynomial ansatz.
polynom(series, l, x = 0, c = 1, m = 2, d = 1, p = 2, n, L)
series |
a vector or a matrix. |
l |
number of data to use. |
x |
number of lines to be ignored. |
c |
column to be read. |
m |
embedding dimension. |
d |
delay. |
p |
order of the polynomial. |
n |
number of points for the fit. |
L |
length of the predicted series. |
The points following the first n
ones are used to estimate the out of sample error.
a list composed by:
coeff |
the model coefficients |
err |
the average insample error and average out of sample error, the latter if L is set >0. |
pred |
the predicted points, if L is set >0. |
## Not run: dat <- sin(1:10000)+rnorm(10000)/5 polynomout <- polynom(dat, p = 3, L=100, n=9900) pred <- polynomout$pred plot(dat[9901:10000],t="l",xlab="Time",ylab="Sin data",ylim=c(-1.9,max(dat))) lines(pred,col=2) legend(70,-1.5, "Noisy Data",fill=1, bty="n") legend(70,-1.7,"Filtered Data",fill=2,bty="n") ## End(Not run)