#
# WE_L16 Model (1450-1640) Cut-and-Paste Code Below into Window above and RUn
#
#
# Measurement Matrix (Growth), (Q+N-U), (Q-N)
# Q N U
#[1,] 0.578 0.587 0.567
#[2,] 0.549 0.234 -0.802
#[3,] 0.603 -0.775 0.187
#
# Fraction of Variance
#[1] 0.963 1.000 1.000
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
f <- matrix( c(0.9988831719, 0.008632483, 0.2636780, 0.0293202238,
-0.0067967372, 1.015541123, 0.7816373, -0.0028147364,
0.0001071906, -0.001015251, 1.0888209, 0.0001152703,
0.00000000, 0.0000000, 0.0000000, 1.0000000000
),byrow=TRUE,nrow=4,ncol=4)
h <- eye(3,4)
k <- (f[,1:3,drop=FALSE])
WE_L16 <- SS(F=f,H=h,K=k,z0=c( 0.0293202238, -0.0028147364, 0.0001152703 , 1.0000000000),
output.names=c("WE1","WE2","WE3"))
print(WE_L16)
is.SS(WE_L16)
stability(WE_L16)
# tfplot(simulate(WE_L16,sampleT=150))
WE_L16.data <- simulate(WE_L16,sampleT=150,start=1450)
WE_L16.data <- simulate(WE_L16,sampleT=150,noise=matrix(0,100,3),start=1450)
WE_L16.f <- forecast(l(WE_L16,WE_L16.data),horizon=150)
tfplot(WE_L16.f)
AIC(m <- l(WE_L16,WE_L16.data))