#
# Cut-and-paste code below into Window above and Run
#
# JP1 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), (LU-CO2), (CO2+LU-Q-L)
#
# EN.ATM.CO2E.KT EG.USE.COMM.KT.OE NY.GDP.MKTP.KD SL.TLF.TOTL.IN
#[1,] 0.404 0.416 0.41333 0.4141
#[2,] -0.472 -0.175 0.00738 -0.0346
#[3,] 0.594 0.163 -0.51541 -0.4879
# SP.POP.TOTL SL.UEM.TOTL.ZS
#[1,] 0.4142 0.387
#[2,] -0.1325 0.853
#[3,] -0.0563 0.338
#
# Fraction of Variance
# [1] 0.951 0.982 0.994 0.999 1.000 1.000
f <- matrix( c( 0.9761515, 0.188116,
0.0000000, 1.0000000
),byrow=TRUE,nrow=2,ncol=2)
h <- eye(1,2)
k <- f[1:2,1,drop=FALSE]
JP1 <- SS(F=f,H=h,K=k,z0=c( 0.188116, 1.0000000),
output.names=c("JP1"))
tfplot(simulate(JP1,sampleT=150,noise=matrix(0,150,1),start=1950))
#