| masPred1 | R Documentation |
A moving average smoother is a sequence which replaces X_t by a fitted polynomial based on the window of size n = 2m + s around X_t. The simplest smoother is the linear one.
masPred1(x, m, s)
x |
a vector of data X_t. |
m |
the m to define the window size. |
s |
the s to define the window size. |
a vector with values form the linear smoother predictor.
Shelemyahu Zacks
set.seed(123)
x <- 1:20 + rnorm(20, 0, 0.1)
masPred1(x, m = 3, s= 1)
masPred1(x, m = 3, s= 3)
data(DOW1941)
plot(DOW1941$Date, DOW1941$DOW1941,
type="l",
ylab="Dow Jones 1941", xlab="Date")
lines(DOW1941$Date, masPred1(DOW1941$DOW1941, m = 3, s= 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.