#
# Cut-and-paste code below into Window above and Run
#
# FR1 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) (CO2 + EF - KOF) (LU - L - N)
#
# EN.ATM.CO2E.KT EG.USE.COMM.KT.OE NY.GDP.MKTP.KD SL.TLF.TOTL.IN
#[1,] 0.004201 0.3740 0.3762 0.369
#[2,] 0.781330 0.0959 -0.0379 -0.059
#[3,] 0.000453 0.0585 -0.1871 -0.355
# SP.POP.TOTL SL.UEM.TOTL.ZS KOF EF HDI
#[1,] 0.3742 0.3299 0.3643 0.2460 0.3748
#[2,] -0.0241 -0.0912 -0.1994 0.5658 -0.0815
#[3,] -0.2225 0.8719 0.0366 0.0632 -0.1437
#
# Fraction of Variance
#[1] 0.774 0.947 0.980 0.995 0.998 0.999 1.000 1.000 1.000
#
f <- matrix( c( 0.9784283, 0.1593365,
0.0000000, 1.0000000
),byrow=TRUE,nrow=2,ncol=2)
h <- eye(1,2)
k <- f[1:2,1,drop=FALSE]
FR1 <- SS(F=f,H=h,K=k,z0=c( 0.1593365, 1.0000000),
output.names=c("FR1"))
tfplot(simulate(FR1,sampleT=150,noise=matrix(0,150,1),start=1950))
#