# Cut-and-paste code below into Window above and Run
#
# DE1 SYS Model
#
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)
#
# Measurement Matrix (Growth) (EF+EG+CO2 -Q - LU) (N + KOF + EF - CO2)
#
# Measurement Matrix
# EN.ATM.CO2E.KT EG.USE.COMM.KT.OE NY.GDP.MKTP.KD SL.TLF.TOTL.IN
#[1,] 0.333 0.3207 0.3460 0.360
#[2,] 0.286 0.4125 -0.2792 -0.119
#[3,] -0.603 0.0753 -0.0969 -0.198
# SP.POP.TOTL SL.UEM.TOTL.ZS KOF EF HDI
#[1,] 0.344 0.348 0.361 0.206 0.353
#[2,] -0.192 -0.226 -0.048 0.722 -0.213
#[3,] 0.620 -0.105 0.324 0.230 -0.168
#
# Fraction of Variance
#[1] 0.827 0.968 0.987 0.994 0.997 0.999 1.000 1.000 1.000
#
f <- matrix( c( 0.95352, 0.1653579,
0.0000000, 1.0000000
),byrow=TRUE,nrow=2,ncol=2)
h <- eye(1,2)
k <- f[1:2,1,drop=FALSE]
DE1 <- SS(F=f,H=h,K=k,z0=c( 0.1653579, 1.0000000),
output.names=c("DE1"))
tfplot(simulate(DE1,sampleT=150,noise=matrix(0,150,1),start=1950))
#