#
# NACL20 BAU Model (Growth- LU), (LU), (CO2 + E - Q - M)
#
# Measurement Matrix
# EN.ATM.CO2E.KT EG.USE.COMM.KT.OE NY.GDP.MKTP.KD SL.TLF.TOTL.IN
#[1,] 0.4364 0.439 0.4419 0.444
#[2,] 0.0709 0.049 0.0248 0.119
#[3,] 0.5711 0.512 -0.4909 -0.238
# SP.POP.TOTL SL.UEM.TOTL.ZS
#[1,] 0.444 -0.16421
#[2,] 0.102 0.98358
#[3,] -0.337 0.00945
#
# Fraction of Variance
#[1] 0.824 0.973 0.994 0.999 1.000 1.000
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
f <- matrix( c(0.98459345, 0.03242716, -0.07593088, 0.143592850,
0.01351879, 0.69160748, 0.12954780, 0.020758284,
-0.01852557, -0.01318351, 0.92498947, 0.004671989,
0.00000000, 0.0000000, 0.0000000, 1.0000000000
),byrow=TRUE,nrow=4,ncol=4)
#
# To Stabilize Model, Uncomment Next line
# f[1,1] <- 0.9
#
h <- eye(3,4)
k <- (f[,1:3,drop=FALSE])
NAC20 <- SS(F=f,H=h,K=k,z0=c(0.143592850, 0.020758284, 0.004671989, 1.0000000000),
output.names=c("NAC1","NC2","NAC3"))
print(NAC20)
is.SS(NAC20)
stability( m <- SS(F=f[1:3,1:3,drop=FALSE],H=eye(3),K=eye(3)))
# tfplot(simulate(NAC20,sampleT=100))
NAC20.data <- simulate(NAC20,sampleT=20,noise=matrix(0,20,3),start=1960)
NAC20.f <- forecast(l(NAC20,NAC20.data),horizon=50)
tfplot(NAC20.f)
AIC(l(NAC20,NAC20.data))
shockDecomposition(m)
#
# LCI Parameter UCI P>=T[1] P< T[1] Std. Dev.
# [1,] 0.969459 0.984593 0.997735 0.38 0.62 0.011609
# [2,] -0.017532 0.013519 0.047808 0.62 0.38 0.027357
# [3,] -0.025623 -0.018526 -0.013206 0.47 0.53 0.006174
# [4,] -0.008038 0.032427 0.079976 0.59 0.41 0.035869
# [5,] 0.544557 0.691607 0.812814 0.56 0.44 0.104339
# [6,] -0.024217 -0.013184 -0.001754 0.58 0.42 0.009780
# [7,] -0.156219 -0.075931 0.009955 0.41 0.59 0.072603
# [8,] -0.044947 0.129548 0.281415 0.58 0.42 0.147035
# [9,] 0.869596 0.924989 0.973686 0.28 0.72 0.045721
#[10,] 0.128974 0.143593 0.158108 0.70 0.30 0.010725
#[11,] -0.046654 0.020758 0.092172 0.60 0.40 0.049969
#[12,] -0.004985 0.004672 0.013633 0.44 0.56 0.008505
#