#
# Cut-and-Paste Code Below into Window above and Run
#
require(dse)
require(matlab)
f<- matrix (c(1.04, 0, 0,
0.375, 1.04, 0,
0, 0.01, 0),
byrow=TRUE,nrow=3,ncol=3)
#
# To reduce Population Growth Uncomment Following line
# f[1,1] <- .90
# To reduce Economic Growth, Uncomment Following Line
# f[2,2] <- .90
# To Reduce CO2 Emissions
# f[3,3] <- .90 ; f[3,2] <- 0.0001
#
h <- eye(3,3)
k <- f[1:3,1:3,drop=FALSE]
KAYA <- SS(F=f,H=h,K=k,output.names=c("N","Q","CO2"),z0=c(1,1,1))
stability(KAYA)
m <- toSSChol(KAYA)
m
shockDecomposition(m)
KAYA.data <- simulate(KAYA,sampleT=50,noise=matrix(0,50,3),start=1)
#tfplot(KAYA.data)
mm <- l(KAYA,KAYA.data)
#tfplot(mm)
tfplot(forecast(mm,horizon=50))