#
# Cut-and-paste code below into Window above and Run
#
# RU1 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) (KOF+ LU - CO2 - EF ) (Q - EF LU- N)
#
# EN.ATM.CO2E.KT EG.USE.COMM.KT.OE NY.GDP.MKTP.KD
#[1,] 0.2821 0.406 0.334
#[2,] -0.4399 -0.220 -0.136
#[3,] 0.0643 -0.145 0.594
# SL.TLF.TOTL.IN SP.POP.TOTL SL.UEM.TOTL.ZS HDI EF KOF
#[1,] 0.4343 0.372 0.189 0.4340 0.235 0.195
#[2,] 0.1328 0.227 0.497 0.0341 -0.395 0.516
#[3,] 0.0494 -0.394 -0.337 0.2254 -0.488 0.247
#
# Fraction of Variance
#[1] 0.549 0.848 0.968 0.981 0.992 0.997 0.999 1.000 1.000
#
f <- matrix( c( 0.9685498, 0.1510723,
0.0000000, 1.0000000
),byrow=TRUE,nrow=2,ncol=2)
h <- eye(1,2)
k <- f[1:2,1,drop=FALSE]
RU1 <- SS(F=f,H=h,K=k,z0=c( 0.1510723, 1.0000000),
output.names=c("RU1"))
tfplot(simulate(RU1,sampleT=150,noise=matrix(0,150,1),start=1950))
#