This website allows you to browse and run (in the window above) forecasts for countries in the World-System. R-code is available on my Google Drive.
#
# WL20W Model (Cut and Paste to Window Above, Run (Cmd-Enter)
#
AIC <- function(model) {informationTestsCalculations(model)[3]}
require(dse)
require(matlab)
# Measurement Matrix (Growth) (HDI-Earths-EG) (LU+KOF-N-Earths-HDI)
# EN.ATM.CO2E.KT EG.USE.COMM.KT.OE NY.GDP.MKTP.KD SL.TLF.TOTL.IN
#[1,] 0.3376 0.336 0.340 0.339
#[2,] -0.0766 -0.291 0.087 -0.108
#[3,] 0.0303 -0.020 0.106 -0.272
# SP.POP.TOTL SL.UEM.TOTL.ZS Earths WorldGlobal HDI
#[1,] 0.3396 0.33722 0.332 0.33700 0.300
#[2,] 0.0168 -0.00225 -0.389 -0.00943 0.859
#[3,] -0.3438 0.60303 -0.395 0.47912 -0.214
#
# Fraction of Variance
#[1] 0.959 0.992 0.995 0.998 1.000 1.000 1.000 1.000 1.000
#
f <- matrix( c(1.012515245, 0.004650047, 0.01709644, 0.16883530,
0.015455666, 0.959520970, -0.15167718, -0.01127248,
0.005752657, 0.036998778, 1.05980297, 0.01080932,
0.00000000, 0.0000000, 0.0000000, 1.0000000000
),byrow=TRUE,nrow=4,ncol=4)
#
# Uncomment to Stabilize Growth
# f[1,1] <- 0.99
# f[2,2] <- 0.94
# f[3,3] <- 1.03
h <- eye(3,4)
k <- (f[,1:3,drop=FALSE])
WL20W <- SS(F=f,H=h,K=k,z0=c(0.16883530, -0.01127248, 0.01080932, 1.0000000000),
output.names=c("W1","W2","W3"))
print(WL20W)
#is.SS(WL20W)
stability(SS(F=f[1:3,1:3,drop=FALSE],H=eye(3),Q=eye(3),R=eye(3)) )
# tfplot(simulate(WL20W,sampleT=100,start=1950))
WL20W.data <- simulate(WL20W,sampleT=150,noise=matrix(0,150,3),start=1950)
WL20W.f <- forecast(m <- l(WL20W,WL20W.data),horizon1=50)
tfplot(WL20W.f)
AIC(m)
WL20Wx <- SS(F=f,H=h,Q=eye(4,3),R=eye(3),z0=c(0.16883530, -0.01127248, 0.01080932, 1.0000000000),
output.names=c("W1","W2","W3"))
shockDecomposition(WL20Wx)
#
# Bootstrap Confidence Intervals
#
# LCI Parameter UCI P>=T[1] P< T[1] Std. Dev. Bias Bias-z
# [1,] 0.999042 1.012515 1.026560 0.34 0.66 0.010839 0.001886 0.1740
# [2,] 0.012251 0.015456 0.018762 0.51 0.49 0.002835 0.996743 351.6422
# [3,] 0.003176 0.005753 0.008326 0.37 0.63 0.002469 1.006875 407.7847
# [4,] -0.047283 0.004650 0.049143 0.42 0.58 0.041555 1.013374 24.3861
# [5,] 0.938014 0.959521 0.977878 0.44 0.56 0.017021 0.059066 3.4702
# [6,] 0.029809 0.036999 0.043918 0.59 0.41 0.006049 0.974077 161.0207
# [7,] -0.212004 0.017096 0.222945 0.45 0.55 0.175871 1.015463 5.7739
# [8,] -0.201945 -0.151677 -0.110399 0.56 0.44 0.041990 1.166313 27.7762
# [9,] 1.012621 1.059803 1.114966 0.23 0.77 0.044344 -0.026858 -0.6057
#[10,] 0.158064 0.168835 0.180791 0.67 0.33 0.012203 0.837650 68.6425
#[11,] -0.022312 -0.011272 -0.001087 0.48 0.52 0.008541 1.024571 119.9577
#[12,] 0.005685 0.010809 0.016581 0.37 0.63 0.004768 1.001938 210.1335
#