#
#
# DE_LM Model (Germany)
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
#
# Measurement Matrix (Growth-HOURS), (L+N-X), (X+L-U)
# (EXPORT LED GROWTH?)
# Q N U HOURS XREAL X L
#[1,] 0.389 0.3728 0.39069 -0.374 0.3867 0.368 0.364
#[2,] 0.157 0.4491 0.00261 0.434 -0.2155 -0.493 0.544
#[3,] -0.170 -0.0985 -0.48120 0.244 -0.0912 0.649 0.491
#
# Fraction of Variance
#[1] 0.934 0.999 1.000 1.000 1.000 1.000 1.000
#
f <- matrix( c(
0.9995837694, 0.03504777, -0.001153864, 0.168405987,
-0.0323463858, 1.00764178, -0.380964610, -0.006413983,
-0.0003978753, 0.02765853, 0.991209573, -0.008411533,
0.000000000, 0.00000000, 0.0000000, 1.000000000
),byrow=TRUE,nrow=4,ncol=4)
#
# To Stabilize System Uncomment Next Line
# f[1,1] <- 0.9895879317; f[2,2] <- 0.99756536; f[3,3] <- 0.981297478
#
h <- eye(3,4)
k <- (f[,1:3,drop=FALSE])
DE_LM <- SS(F=f,H=h,K=k,z0=c(0.33652679, -0.01511981, -0.01699353, 1.0000000000),
output.names=c("DE1","DE2","DE3"))
print(DE_LM)
is.SS(DE_LM)
stability(DE_LM)
# tfplot(simulate(DE_LM,sampleT=100,start=1950))
DE_LM.data <- simulate(DE_LM,sampleT=100,noise=matrix(0,100,3),start=1950)
DE_LM.f <- forecast(m <- l(DE_LM,DE_LM.data),horizon=100)
tfplot(DE_LM.f)
AIC(m)
shockDecomposition(toSSChol(DE_LM))