predPoly | R Documentation |
A quadratic polynomial fitted to the last n observations. We then extrapolate to estimate f(t + s) with s >= 1.
predPoly(x, n, s)
x |
a vector of data X_t. |
n |
the n to define the window size. |
s |
the extrapolation parametr s. |
a vector with values from the quadratic predictor.
Shelemyahu Zacks
data(DOW1941) plot(DOW1941$Date, DOW1941$DOW1941, type="l", ylab="Dow Jones 1941", xlab="Date") lines(DOW1941$Date, predPoly(DOW1941$DOW1941, n = 20, s= 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.