#
# W_RE World Europe Model Roman Empire (RE) RW Model
#
# Measurement Matrix
# Q N
#[1,] 0.707 0.707
#[2,] 0.707 -0.707
#
# Fraction of Variance
#[1] 1 1
#
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 <- eye(2)
h <- eye(2)
q <- eye(2)
r <- eye(2)
W_RE <- SS(F=f,H=h,Q=q,R=r,z0=c(-2.65802382, -0.02164968 ),
output.names=c("W1","W2"))
print(W_RE)
is.SS(W_RE)
stability(W_RE)
tfplot(W_RE.data <- simulate(W_RE,sampleT=150,start=0))
#
W_RE.f <- forecast(m <- l(W_RE,W_RE.data),horizon=50)
tfplot(W_RE.f)