Commit 0a33a427 authored by Houtan Bastani's avatar Houtan Bastani

update smets and wouters .mod file for OLS

parent a3224f15
// --+ options: json=compute +--
path(['..' filesep 'ols'], path);
/*
* This file provides replication files for
* Smets, Frank and Wouters, Rafael (2007): "Shocks and Frictions in US Business Cycles: A Bayesian
......@@ -34,15 +37,15 @@
*/
var labobs robs pinfobs dy dc dinve dw ewma epinfma zcapf rkf kf pkf cf
invef yf labf wf rrf mc zcap rk k pk c inve y lab pinf w r a b g qs ms
spinf sw kpf kp;
invef yf labf wf rrf mc zcap rk k pk c inve y lab pinf w r a b g qs
spinf sw kpf kp ygap;
varexo ea eb eg eqs em epinf ew;
varexo ea eb eg eqs ms epinf ew;
parameters curvw cgy curvp constelab constepinf constebeta cmaw cmap calfa
czcap csadjcost ctou csigma chabb ccs cinvs cfc
cindw cprobw cindp cprobp csigl clandaw
crdpi crpi crdy cry crr
crdpi crdy crr crpiMcrpiXcrr cryMcryXcrr
crhoa crhoas crhob crhog crhols crhoqs crhoms crhopinf crhow
ctrend cg;
......@@ -68,10 +71,10 @@ cprobp= 0.6;
cindw= 0.3243;
cindp= 0.47;
czcap= 0.2696;
crpi= 1.488;
crr= 0.8762;
cry= 0.0593;
crdy= 0.2347;
crpiMcrpiXcrr = 0.1842;
cryMcryXcrr = 0.0073;
crhoa= 0.9977;
crhob= 0.5799;
......@@ -135,12 +138,13 @@ model(linear);
y = cfc*( calfa*k+(1-calfa)*lab +a );
pinf = (1/(1+cbetabar*cgamma*cindp)) * ( cbetabar*cgamma*pinf(1) +cindp*pinf(-1)+((1-cprobp)*(1-cbetabar*cgamma*cprobp)/cprobp)/((cfc-1)*curvp+1)*(mc) ) + spinf;
w = (1/(1+cbetabar*cgamma))*w(-1)+(cbetabar*cgamma/(1+cbetabar*cgamma))*w(1)+(cindw/(1+cbetabar*cgamma))*pinf(-1)-(1+cbetabar*cgamma*cindw)/(1+cbetabar*cgamma)*pinf+(cbetabar*cgamma)/(1+cbetabar*cgamma)*pinf(1)+(1-cprobw)*(1-cbetabar*cgamma*cprobw)/((1+cbetabar*cgamma)*cprobw)*(1/((clandaw-1)*curvw+1))*(csigl*lab + (1/(1-chabb/cgamma))*c - ((chabb/cgamma)/(1-chabb/cgamma))*c(-1) -w)+ 1*sw;
r = crpi*(1-crr)*pinf+cry*(1-crr)*(y-yf)+crdy*(y-yf-y(-1)+yf(-1))+crr*r(-1)+ms;
[name='taylor_rule']
r = crpiMcrpiXcrr*pinf + cryMcryXcrr*ygap + crdy*diff(ygap) + crr*r(-1) + ms;
ygap = y - yf;
a = crhoa*a(-1) + ea;
b = crhob*b(-1) + eb;
g = crhog*(g(-1)) + eg + cgy*ea;
qs = crhoqs*qs(-1) + eqs;
ms = crhoms*ms(-1) + em;
spinf = crhopinf*spinf(-1) + epinfma - cmap*epinfma(-1);
epinfma=epinf;
sw = crhow*sw(-1) + ewma - cmaw*ewma(-1);
......@@ -176,7 +180,7 @@ var eg;
stderr 0.6090;
var eqs;
stderr 0.6017;
var em;
var ms;
stderr 0.2397;
var epinf;
stderr 0.1455;
......@@ -191,7 +195,7 @@ stderr ea,0.4618,0.01,3,INV_GAMMA_PDF,0.1,2;
stderr eb,0.1818513,0.025,5,INV_GAMMA_PDF,0.1,2;
stderr eg,0.6090,0.01,3,INV_GAMMA_PDF,0.1,2;
stderr eqs,0.46017,0.01,3,INV_GAMMA_PDF,0.1,2;
stderr em,0.2397,0.01,3,INV_GAMMA_PDF,0.1,2;
stderr ms,0.2397,0.01,3,INV_GAMMA_PDF,0.1,2;
stderr epinf,0.1455,0.01,3,INV_GAMMA_PDF,0.1,2;
stderr ew,0.2089,0.01,3,INV_GAMMA_PDF,0.1,2;
crhoa,.9676 ,.01,.9999,BETA_PDF,0.5,0.20;
......@@ -213,10 +217,10 @@ cindw,0.4425,0.01,0.99,BETA_PDF,0.5,0.15;
cindp,0.3291,0.01,0.99,BETA_PDF,0.5,0.15;
czcap,0.2648,0.01,1,BETA_PDF,0.5,0.15;
cfc,1.4672,1.0,3,NORMAL_PDF,1.25,0.125;
crpi,1.7985,1.0,3,NORMAL_PDF,1.5,0.25;
crr,0.8258,0.5,0.975,BETA_PDF,0.75,0.10;
cry,0.0893,0.001,0.5,NORMAL_PDF,0.125,0.05;
crdy,0.2239,0.001,0.5,NORMAL_PDF,0.125,0.05;
crpiMcrpiXcrr,0.1842,0.01,2,NORMAL_PDF,1.5,0.25;
cryMcryXcrr,0.0073,0.001,0.975,NORMAL_PDF,0.125,0.05;
constepinf,0.7,0.1,2.0,GAMMA_PDF,0.625,0.1;//20;
constebeta,0.7420,0.01,2.0,GAMMA_PDF,0.25,0.1;//0.20;
constelab,1.2918,-10.0,10.0,NORMAL_PDF,0.0,2.0;
......@@ -227,6 +231,14 @@ end;
varobs dy dc dinve labobs pinfobs dw robs;
estimation(optim=('MaxIter',200),datafile=usmodel_data,mode_file=usmodel_shock_decomp_mode,mode_compute=0,first_obs=1, presample=4,lik_init=2,prefilter=0,mh_replic=0,mh_nblocks=2,mh_jscale=0.20,mh_drop=0.2, nograph, nodiagnostic, tex);
ds = dseries('usmodel_dseries.csv');
ds.ygap = ds.y.detrend(1);
dyn_ols(ds, {}, {'taylor_rule'});
crr = 0.8762;
crdy = 0.2347;
crpiMcrpiXcrr = 0.1842;
cryMcryXcrr = 0.0073;
estimation(optim=('MaxIter',200),datafile=usmodel_data,mode_compute=4,first_obs=1, presample=4,lik_init=2,prefilter=0,mh_replic=0,mh_nblocks=2,mh_jscale=0.20,mh_drop=0.2, nograph, nodiagnostic, tex);
shock_decomposition y;
,y,pinf,r
1947q1,800.3410721948,NaN,0.12
1947q2,799.9193455861,1.4720644345,0.12
1947q3,799.5726987142,1.7332128886,0.2091666667
1947q4,800.7243111094,2.4822397734,0.2516666667
1948q1,801.8846963374,0.7601282706,0.2725
1948q2,803.4184586836,0.8836763822,0.275
1948q3,803.6661469034,1.8409541555,0.2875
1948q4,803.7400553447,0.2473382252,0.31
1949q1,802.0756726111,-0.3984550068,0.3175
1949q2,801.5361434267,-1.1009508728,0.3175
1949q3,802.3729100878,-0.5765825947,0.2858333333
1949q4,801.0602304762,0.098376791,0.2941666667
1950q1,804.7877599226,-0.3077493658,0.3008333333
1950q2,807.4501887322,0.3937497397,0.3133333333
1950q3,811.0799826376,2.090245016,0.33
1950q4,813.1385469033,1.9059540622,0.3591666667
1951q1,814.618490403,3.6607817603,0.3666666667
1951q2,816.4814267912,0.6123856743,0.3975
1951q3,818.4235717081,0.0565131408,0.4258333333
1951q4,818.4004420767,1.1012584608,0.4275
1952q1,819.3237916618,-0.0950384418,0.4166666667
1952q2,819.2571101124,0.1899866463,0.4366666667
1952q3,819.5846643306,1.1434405221,0.4708333333
1952q4,822.4746638469,0.2920836443,0.4983333333
1953q1,823.4274840003,0,0.52
1953q2,823.9658138482,0.1869262186,0.5633333333
1953q3,823.1408054427,0.3837513618,0.5141666667
1953q4,821.2123837514,0.2186271094,0.3933333333
1954q1,820.371831942,0.3216050304,0.29
1954q2,820.1851349162,0.0924742362,0.2225
1954q3,821.0376742785,0.1792650615,0.2566666667
1954q4,822.6834113661,0.2818277298,0.2466666667
1955q1,825.2050502555,0.4805235605,0.3358333333
1955q2,826.4617100291,0.4192427533,0.375
1955q3,827.4656486936,0.7427826921,0.485
1955q4,827.7257313768,1.0064710451,0.5891666667
1956q1,826.9873364284,1.0068782951,0.6208333333
1956q2,827.4998569246,0.5775099946,0.6733333333
1956q3,827.084215934,1.2783679247,0.7025
1956q4,828.4175117664,0.3834066502,0.7316666667
1957q1,828.7617580574,1.4034429213,0.7333333333
1957q2,828.2234368938,0.6819119886,0.75
1957q3,828.850848107,0.5928821891,0.8083333333
1957q4,827.399825899,0.0099344328,0.8133333333
1958q1,824.3194246202,1.0966322111,0.4658333333
1958q2,824.6467786487,0.3139257986,0.235
1958q3,826.6544989039,0.6541075748,0.3308333333
1958q4,828.5464491813,0.4998918415,0.5408333333
1959q1,830.062672823,0.2321084214,0.6425
1959q2,832.2889312577,0,0.7708333333
1959q3,831.8560589345,0.2363896221,0.8941666667
1959q4,831.8900918191,0.4183402346,0.9975
1960q1,833.4112026282,0.435709674,0.9833333333
1960q2,832.6293154402,0.348158215,0.9241666667
1960q3,832.4665994185,0.3801563217,0.7341666667
1960q4,830.811477465,0.2936303317,0.5741666667
1961q1,831.0479924092,0.2172989659,0.5008333333
1961q2,832.5880440622,0.212119149,0.4333333333
1961q3,833.8888373152,0.3102964408,0.4208333333
1961q4,835.7535279227,0.3374106955,0.6
1962q1,837.3770232309,0.5877430857,0.6141666667
1962q2,838.0946018163,0.1487196445,0.6516666667
1962q3,838.554176134,0.2411986883,0.7116666667
1962q4,838.2366684399,0.3145383971,0.7308333333
1963q1,839.0496546108,0.226040922,0.7416666667
1963q2,839.8582578821,0.1979423852,0.7408333333
1963q3,841.3125277182,0.1975513472,0.8325
1963q4,841.6655255644,0.7453337049,0.8633333333
1964q1,843.4618847738,0.2956765181,0.8658333333
1964q2,844.217054187,0.2585680408,0.8725
1964q3,845.1419035639,0.393371972,0.8641666667
1964q4,844.971168929,0.495161939,0.8941666667
1965q1,846.9794929178,0.5061260888,0.9933333333
1965q2,847.9171694214,0.4324282868,1.0191666667
1965q3,849.5934259008,0.3685371487,1.0183333333
1965q4,851.6494433706,0.6361850483,1.0416666667
1966q1,853.7968707314,0.6496664789,1.1391666667
1966q2,853.8628354175,0.8409085999,1.2283333333
1966q3,854.2341728501,1.0488022075,1.3525
1966q4,854.7365407051,0.9146144619,1.3908333333
1967q1,855.2877591101,0.4541892902,1.2058333333
1967q2,854.9195664384,0.5448453915,0.9975
1967q3,855.2180331061,0.9808109476,0.9733333333
1967q4,855.5179267698,1.1033793706,1.0433333333
1968q1,857.1672759605,1.0872571052,1.1966666667
1968q2,858.5121644887,1.0432618116,1.495
1968q3,858.7826441326,0.9845170036,1.4858333333
1968q4,858.7284181579,1.4056217134,1.4791666667
1969q1,859.8453691819,1.0355470275,1.6416666667
1969q2,859.7233248121,1.2872386178,2.0816666667
1969q3,859.9147665363,1.430508234,2.2458333333
1969q4,858.9559044595,1.2941867582,2.235
1970q1,858.2704979722,1.4181994968,2.1433333333
1970q2,857.9249949432,1.3655597266,1.97
1970q3,858.2411098511,0.7952833564,1.6758333333
1970q4,856.5799188425,1.2830134129,1.3916666667
1971q1,858.7573097143,1.4921682522,0.9641666667
1971q2,858.7505218744,1.3036900649,1.1408333333
1971q3,858.9876928753,1.0054155556,1.3683333333
1971q4,858.706352955,0.7977991674,1.1875
1972q1,859.3400304603,1.553251876,0.885
1972q2,861.1495079256,0.5959173979,1.075
1972q3,861.5673813322,0.9666404222,1.185
1972q4,862.7135377146,1.3201728631,1.2858333333
1973q1,864.7063029754,1.193424464,1.6341666667
1973q2,865.3395834168,1.5355388083,1.9541666667
1973q3,864.2904360618,1.9304526296,2.64
1973q4,864.7342815718,1.9610889954,2.4991666667
1974q1,863.3521681282,1.8934116737,2.3308333333
1974q2,863.13278117,2.3276836398,2.8125
1974q3,861.6589572499,2.8965791506,3.0225
1974q4,860.7656291492,2.9476526097,2.3366666667
1975q1,859.0769774715,2.2712118923,1.5758333333
1975q2,859.333530543,1.5107969778,1.355
1975q3,860.4430544517,1.8412942662,1.54
1975q4,861.2543115913,1.7438993046,1.3533333333
1976q1,863.0020028362,1.0994307542,1.2066666667
1976q2,863.2965468402,1.0648867946,1.2991666667
1976q3,863.2918437198,1.3586996178,1.3208333333
1976q4,863.5620597757,1.8084829202,1.2183333333
1977q1,864.3254278167,1.6257383075,1.165
1977q2,865.8014457737,1.4371305694,1.2891666667
1977q3,867.0873346451,1.209607097,1.455
1977q4,866.6325816437,2.1552309976,1.6283333333
1978q1,866.52506328,1.4781214599,1.6891666667
1978q2,869.9577173254,1.8168958819,1.8208333333
1978q3,870.4811922012,1.6434888975,2.025
1978q4,871.3224339479,2.0941711839,2.3958333333
1979q1,871.0689549768,1.7467232968,2.5183333333
1979q2,870.7433801785,2.438893658,2.545
1979q3,871.0043643801,2.1317092886,2.7366666667
1979q4,870.7809250373,1.9796758424,3.3941666667
1980q1,870.6739305712,2.0869581959,3.7616666667
1980q2,868.2448457472,2.1868528569,3.1716666667
1980q3,867.6634816085,2.2445780106,2.4591666667
1980q4,869.1551405044,2.7317731291,3.9633333333
1981q1,870.8152502823,2.5461811455,4.1425
1981q2,869.7023701997,1.8620010027,4.445
1981q3,870.5667747968,1.7642690719,4.3941666667
1981q4,868.9735640722,1.8078086421,3.3966666667
1982q1,867.0246376933,1.3509740652,3.5566666667
1982q2,867.2553402627,1.2062443907,3.6283333333
1982q3,866.5861942085,1.4025922453,2.7516666667
1982q4,866.3716759782,1.0720713487,2.3216666667
1983q1,867.3325311467,0.8187116397,2.1633333333
1983q2,869.3024304212,0.719588995,2.2008333333
1983q3,870.9742979393,1.0186480657,2.365
1983q4,872.7132598738,0.7526892731,2.3575
1984q1,874.2351320486,1.2420275735,2.4216666667
1984q2,875.6871804551,0.8595892065,2.6391666667
1984q3,876.3878740648,0.7963578251,2.8475
1984q4,876.90256946,0.6337212601,2.3166666667
1985q1,877.6031539588,1.1196859743,2.1191666667
1985q2,878.2146326687,0.5695556293,1.9808333333
1985q3,879.5042068361,0.4132355868,1.975
1985q4,879.973581825,0.6437040075,2.0258333333
1986q1,880.4322503556,0.5151102981,1.9566666667
1986q2,880.5533384236,0.512470504,1.73
1986q3,881.2213349266,0.5770826386,1.5516666667
1986q4,881.4315796937,0.6516953828,1.5666666667
1987q1,881.7376157387,0.8228332891,1.555
1987q2,882.5430673563,0.5434459508,1.6625
1987q3,883.178947118,0.7422782138,1.7108333333
1987q4,884.6639173421,0.7232887424,1.7291666667
1988q1,884.8792457112,0.846886478,1.6658333333
1988q2,885.9137471673,0.9513905516,1.7891666667
1988q3,886.2009728127,1.1106749763,1.9958333333
1988q4,887.2893285676,0.7471265282,2.1175
1989q1,888.0191313645,1.125151216,2.3608333333
1989q2,888.4546390979,0.9544407429,2.4316666667
1989q3,888.9377849225,0.7060963288,2.2708333333
1989q4,888.9685022209,0.6898147426,2.1533333333
1990q1,889.3166764347,1.1890002402,2.0625
1990q2,889.3615142762,1.1578126197,2.0608333333
1990q3,889.1377000581,0.8815915848,2.04
1990q4,888.1081106164,0.7469201639,1.9358333333
1991q1,887.3844440781,1.1788050282,1.6066666667
1991q2,887.8290850659,0.6424681348,1.4658333333
1991q3,888.0674431712,0.7068171287,1.4108333333
1991q4,888.2585124414,0.5224524733,1.2041666667
1992q1,889.0682100375,0.6025982535,1.0058333333
1992q2,889.8032185649,0.5456325233,0.9425
1992q3,890.5105140277,0.4514680355,0.8141666667
1992q4,891.3002687859,0.5172554431,0.7591666667
1993q1,891.1684749681,0.7760317308,0.76
1993q2,891.4426425571,0.5491864147,0.75
1993q3,891.6914330151,0.4299621921,0.765
1993q4,892.7450442316,0.5270045079,0.7475
1994q1,893.5195604364,0.6046509218,0.8033333333
1994q2,894.5929383197,0.418867444,0.985
1994q3,894.8832573713,0.638285893,1.1216666667
1994q4,895.7702457281,0.4650607339,1.2916666667
1995q1,895.9053661343,0.633489257,1.4525
1995q2,895.8750697418,0.3588005311,1.505
1995q3,896.4288681236,0.4670165101,1.4491666667
1995q4,896.884037441,0.479943847,1.43
1996q1,897.3746352206,0.6395773733,1.3408333333
1996q2,898.7486697029,0.3540356771,1.3108333333
1996q3,899.2992552635,0.311284298,1.3266666667
1996q4,900.1591964517,0.5297224185,1.32
1997q1,900.464714757,0.6374557216,1.3191666667
1997q2,901.7564876991,0.1597813858,1.3808333333
1997q3,902.7321839663,0.3439240047,1.3833333333
1997q4,903.1876038049,0.3260531679,1.3766666667
1998q1,904.0628209782,0.2532108577,1.38
1998q2,904.4726078139,0.1663738179,1.375
1998q3,905.3358767271,0.3640157715,1.3833333333
1998q4,906.5447299573,0.3451593328,1.215
1999q1,907.013357117,0.4056383032,1.1833333333
1999q2,907.5689693553,0.3548685276,1.1866666667
1999q3,908.4350790393,0.346472008,1.2733333333
1999q4,909.9004728317,0.4265831509,1.3266666667
2000q1,908.7199555765,0.8950800344,1.42
2000q2,910.0101828436,0.4300174413,1.5683333333
2000q3,909.5771721118,0.5139908518,1.63
2000q4,909.7948671004,0.405126845,1.6183333333
2001q1,909.4188311288,0.8033920052,1.3983333333
2001q2,909.4295374698,0.7598328414,1.0816666667
2001q3,908.7581435499,0.4128305209,0.8741666667
2001q4,908.8324069194,0.50129801,0.5333333333
2002q1,909.4156453153,0.2506764249,0.4333333333
2002q2,909.7564990016,0.444635934,0.4375
2002q3,910.0927559178,0.318994861,0.435
2002q4,909.967449552,0.4870939557,0.3608333333
2003q1,909.6823832211,0.7115301217,0.3125
2003q2,910.4351636549,0.2830114668,0.3116666667
2003q3,911.8877100462,0.3293279126,0.2541666667
2003q4,912.5687513745,0.3526577565,0.2516666667
2004q1,913.5859124135,0.6764336801,0.2508333333
2004q2,914.1650230405,0.7866706617,0.2525
2004q3,914.829588046,0.3592292908,0.3583333333
2004q4,915.443974894,0.5680632239,0.4875
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment