* * CANMODEL.RPF * RATS Version 8, User's Guide, Example 7.8 * ********************************************************************* * * Set Up Data * open data oecdsample.rat calendar(q) 1981 data(format=rats) 1981:1 2006:4 can3mthpcp canexpgdpchs canexpgdpds canm1s canusxsr usaexpgdpch * set logcangdp = log(canexpgdpchs) set logcandefl = log(canexpgdpds) set logcanm1 = log(canm1s) set logusagdp = log(usaexpgdpch) set logexrate = log(canusxsr) * ********************************************************************** * * RunTheil Procedure * Needs modification of the lines tagged with ;*<<<<<<< to accomodate * different models. Computes Theil U's for a VAR using either a * symmetric or general prior. * * By setting TIGHTNESS to a large value (such as 2.00), you effectively * eliminate the "Bayesian" part, and thus look at an OLS VAR. * * By setting OTHER to a very small value (such as .001), you effectively * eliminate the "Vector" part, and thus look at an autoregression only. * procedure runtheil option choice type 1 symmetric general option rect matrix option vector mvector option real tightness .1 option real other .5 option string window * local integer time * system(model=canmodel) ;*<<<<<<< variables logcangdp logcandefl logcanm1 logexrate can3mthpcp logusagdp ;*<<<<<<<< lags 1 to 4 ;*<<<<<<< det constant specify(tightness=tightness,type=type,matrix=matrix,mvector=mvector) other end(system) * theil(model=canmodel,setup,steps=12,to=2006:4) ;*<<<<<<< estimate(noprint) * 1998:4 ;*<<<<<<< theil do time=1999:1,2006:3 ;*<<<<<<< kalman theil end do time theil(dump,window=window) end * *********************************************************************** * @runtheil(tightness=2.0,other=.001,window="Univariate OLS") @runtheil(tightness=0.1,other=.001,window="Univariate BVAR") @runtheil(tightness=0.1,other=0.5,window="Simple BVAR") @runtheil(tightness=2.0,other=1.0,window="OLS VAR") * @runtheil(tight=.10,type=general,window="General") # 1.00 0.50 0.50 0.50 0.50 0.50 $ 0.50 1.00 0.50 0.50 0.50 0.50 $ 0.01 0.01 1.00 0.01 0.01 0.01 $ 0.01 0.01 0.01 1.00 0.01 0.01 $ 0.20 0.20 0.20 0.20 2.00 0.20 $ 0.50 0.50 0.50 0.50 0.50 1.00