#
# OA_RE Other Asia Model Roman Empire (RE)
#
#Measurement Matrix
# Q N
#[1,] 0.707 0.707
#[2,] 0.707 -0.707
#
# Fraction of Variance
#[1] 0.96 1.00
#
merge.forecast <- function (fx,n=1) {
x <- splice(fx$pred,fx$forecast[[n]])
colnames(x) <- seriesNames(fx$data$output)
return(x)
}
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
f <- matrix( c( 1.002523525, -0.00505709, 0.001026830,
0.003494434, 0.99431572, 0.001316391,
0.000000000, 0.00000000, 1.0000000000)
,byrow=TRUE,nrow=3,ncol=3)
h <- eye(2,3)
k <- (f[,1:2,drop=FALSE])
OA_RE <- SS(F=f,H=h,K=k,z0=c(0.001026830, 0.001316391, 1.0000000000),
output.names=c("OA1","OA2"))
print(OA_RE)
is.SS(OA_RE)
stability(OA_RE)
#tfplot(OA_RE.data <- simulate(OA_RE,sampleT=500,start=0))
tfplot(OA_RE.data <- simulate(OA_RE,sampleT=500,noise=matrix(0,500,2),start=0))
OA_RE.f <- forecast(m <- l(OA_RE,OA_RE.data),horizon=500)
tfplot(OA_RE.f)
AIC(m)
shockDecomposition((m))