#
# AT_L16 Model (1450-1640) Cut-and-Paste code below into window above and Run
#
#
# Measurement Matrix (Q+N-X), (Growth), (Q-N)
# Q N XREAL X
#[1,] 0.494 0.505 -0.501 -0.501
#[2,] 0.713 0.231 0.468 0.468
#[3,] 0.498 -0.832 -0.174 -0.174
#
#Fraction of Variance
#[1] 0.976 1.000 1.000 1.000
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
f <- matrix( c(0.9951224233, 0.017795720, 0.08176782, 0.0333069223,
-0.0052685517, 1.016855977, 0.08680236, -0.0027152341,
-0.0001310489, -0.005890895, 0.99810620, 0.0007988188,
0.00000000, 0.0000000, 0.0000000, 1.0000000000
),byrow=TRUE,nrow=4,ncol=4)
h <- eye(3,4)
k <- (f[,1:3,drop=FALSE])
AT_L16 <- SS(F=f,H=h,K=k,z0=c( 0.0333069223, -0.0027152341, 0.0007988188 , 1.0000000000),
output.names=c("AT1","AT2","AT3"))
print(AT_L16)
is.SS(AT_L16)
stability(AT_L16)
# tfplot(simulate(AT_L16,sampleT=150))
AT_L16.data <- simulate(AT_L16,sampleT=150,start=1450)
#AT_L16.data <- simulate(AT_L16,sampleT=150,noise=matrix(0,150,3),start=1450)
AT_L16.f <- forecast(l(AT_L16,AT_L16.data),horizon=150)
tfplot(AT_L16.f)
AIC(m <- l(AT_L16,AT_L16.data))
shockDecomposition(toSSChol(m))