#
# US_L16 Model (1450-1640) Cut-and-paste code below into window above and Run
#
#
# Measurement Matrix (Growth), (N-X)
# N X
#[1,] 0.707 0.707
#[2,] 0.707 -0.707
#
# Fraction of Variance
#[1] 0.989 1.000
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
f <- matrix( c( 0.997130324, 0.02287263, -0.023428988,
-0.002869676, 1.02287263, 0.002153238,
0.00000000, 0.0000000, 1.0000000000
),byrow=TRUE,nrow=3,ncol=3)
h <- eye(2,3)
k <- (f[,1:2,drop=FALSE])
US_L16 <- SS(F=f,H=h,K=k,z0=c( -0.023428988, 0.002153238 , 1.0000000000),
output.names=c("US1","US2"))
print(US_L16)
is.SS(US_L16)
stability(US_L16)
# tfplot(simulate(US_L16,sampleT=150))
US_L16.data <- simulate(US_L16,sampleT=150,start=1450)
#US_L16.data <- simulate(US_L16,sampleT=150,noise=matrix(0,100,2),start=1450)
US_L16.f <- forecast(l(US_L16,US_L16.data),horizon=150)
tfplot(US_L16.f)
AIC(m <- l(US_L16,US_L16.data))
shockDecomposition(toSSChol(m))