#
# Cut-and-Paste Code below into Window above and Run
#
# help(dse)
# help(SS)
#
# AXIS BAU Growth
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
#
# Measurement Matrix
# RU1 IN1 CN1
#[1,] 0.514 0.601 0.612
#[2,] 0.855 -0.414 -0.311
#
# Fraction of Variance
#[1] 0.843 0.994 1.000
#
f <- matrix( c( 1.01460086, -0.03779872, 0.115936692,
-0.01948855, 0.96412537, 0.009885037,
0.00000000, 0.00000000, 1.000000000
),nrow=3,ncol=3, byrow=TRUE)
#
# To stabilize, uncomment the next line
# f[1,1] <- 0.98; f[2,2] <- 0.94
#
h <- eye(2,3)
k <- (f[,1:2,drop=FALSE])
AXIS <- SS(F=f,H=h,K=k,z0=c( 0.115936692, 0.009885037, 1.000000000),
output.names=c("AXIS1", "AXIS2"))
print(AXIS)
is.SS(AXIS)
stability(AXIS)
AXIS.data <- simulate(AXIS,sampleT=150,noise=matrix(0,150,2),start=1960)
tfplot(AXIS.data)
AXIS.f <- forecast(l(AXIS,AXIS.data),horizon=150,start=1960)
tfplot(AXIS.f)
AIC(l(AXIS,AXIS.data))
shockDecomposition(toSSChol(AXIS))