AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
#
# Measurement Matrix
# K L Q
#[1,] 0.577 0.577 0.577
#[2,] 0.812 -0.334 -0.478
#
# Fraction of Variance
#[1] 1 1 1
#
f <- matrix( c(-6.331224e-17, 0, 2.705009e-01,
1.405814e-31, 0 , 1.912512e-16,
0.000000e+00, 0, 1.000000e+00
),byrow=TRUE,nrow=3,ncol=3)
k <- (f[1:3,1:2,drop=FALSE])
h <-matrix( c(1, 0, 0,
0, 1, 0
),byrow=TRUE,nrow=2,ncol=3)
Smith <- SS(F=f,H=h,K=k,z0=c(2.705009e-01, 1.912512e-16,1),
output.names=c("Smith1","Smith2"))
print(Smith)
is.SS(Smith)
stability(Smith)
# tfplot(simulate(Smith,sampleT=100))
Smith.data <- simulate(Smith,sampleT=100,start=1)
Smith.f <- forecast(l(Smith,Smith.data),horizon=100)
tfplot(Smith.f)
Smith_RW <- SS(F=eye(2),H=eye(2),K=eye(2),z0=c(2.705009e-01, 1.912512e-16),
output.names=c("Smith1","Smith2"))
tfplot(simulate(Smith_RW,sampleT=100,start=1))
shockDecomposition(Smith_RW)
AIC(l(Smith_RW,Smith.data))