| dlmLg | R Documentation |
Dynamic Linear Model with linear growth.
dlmLg(x, C0, v, W, M0)
x |
a vector of data X_t. |
C0 |
prior covariance matrix |
v |
prior variance of V. |
W |
prior variance of W. |
M0 |
prior mean. |
a vector with values from the Dynamic Linear Model.
Shelemyahu Zacks
C0 <- matrix(c(0.22325, -0.00668, -0.00668, 0.00032), nrow = 2, byrow = TRUE)
W <- matrix(c(0.3191, -0.0095, -0.0095, 0.0004), nrow = 2, byrow = TRUE)
M0 <- matrix(c(134.234, -0.3115), nrow = 2)
v <- 0.1
data(DOW1941)
plot(DOW1941$Date, DOW1941$DOW1941,
type="l",
ylab="Dow Jones 1941", xlab="Date")
lines(DOW1941$Date, dlmLg(DOW1941$DOW1941, C0 = C0, v = v, W = W, M0 = M0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.