#
# W_E20 Model Cut-and-Paste Code below into window above and Run
#
# Measurement Matrix (Growth-XREAL), (XREAL+Q-T), (T+XREAL-L)
# Q N XREAL X L T
#[1,] 0.3934 0.471 -0.232 0.4614 0.4743 0.363
#[2,] 0.5140 0.146 0.742 0.0112 0.0842 -0.395
#[3,] 0.0375 -0.192 0.477 -0.0230 -0.2188 0.828
#
# Fraction of Variance
#[1] 0.717 0.925 0.982 1.000 1.000 1.000
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
f <- matrix( c( 1.002900989, -0.01221580, -0.3389237, 0.11196869,
0.089905713, 1.06700279, 0.3800768, 0.07620913,
-0.001940628, 0.07357085, 0.2758457, -0.02539065,
0.00000000, 0.0000000, 0.0000000, 1.0000000000
),byrow=TRUE,nrow=4,ncol=4)
h <- eye(3,4)
k <- (f[,1:3,drop=FALSE])
WE20 <- SS(F=f,H=h,K=k,z0=c(0.11196869, 0.07620913, -0.02539065, 1.0000000000),
output.names=c("W1","W2","W3"))
print(WE20)
is.SS(WE20)
stability(WE20)
# tfplot(simulate(WE20,sampleT=100))
WE20.data <- simulate(WE20,sampleT=100,noise=matrix(0,100,3),start=1900)
WE20.f <- forecast(l(WE20,WE20.data),horizon=100)
tfplot(WE20.f)
AIC(m <- l(WE20,WE20.data))
shockDecomposition(m)