Remove spurious indentation changes

This commits reverts various spurious indentation changes that were on the
ecb-master but not on the master branch.
time-shift
Sébastien Villemot 2019-09-26 15:17:54 +02:00
parent ca3b241317
commit f665117879
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
98 changed files with 13313 additions and 13307 deletions

View File

@ -10746,6 +10746,7 @@ plotted in levels.
@end deffn
@deffn Command dynatype (@var{FILENAME}) [@var{VARIABLE_NAME}@dots{}];
This command prints the listed variables in a text file named
@var{FILENAME}. If no @var{VARIABLE_NAME} is listed, all endogenous

View File

@ -80,71 +80,71 @@ eval(['load ' fname]);
% set prefix, shocks, ystart
if ischar(varargin{2})
prefix = varargin{2};
if length(varargin) == 3
shocks = varargin{3};
ystart = NaN;
elseif length(varargin) == 4
shocks = varargin{3};
ystart = varargin{4};
else
error('Wrong number of parameters.');
end
prefix = varargin{2};
if length(varargin) == 3
shocks = varargin{3};
ystart = NaN;
elseif length(varargin) == 4
shocks = varargin{3};
ystart = varargin{4};
else
error('Wrong number of parameters.');
end
else
prefix = 'dyn';
if length(varargin) == 2
shocks = varargin{2};
ystart = NaN;
elseif length(varargin) == 3
shocks = varargin{2};
ystart = varargin{3};
else
error('Wrong number of parameters.');
end
prefix = 'dyn';
if length(varargin) == 2
shocks = varargin{2};
ystart = NaN;
elseif length(varargin) == 3
shocks = varargin{2};
ystart = varargin{3};
else
error('Wrong number of parameters.');
end
end
% load all needed variables but prefix_g_*
if (exist([prefix '_nstat']))
nstat = eval([prefix '_nstat']);
nstat = eval([prefix '_nstat']);
else
error(['Could not find variable ' prefix '_nstat in workspace']);
error(['Could not find variable ' prefix '_nstat in workspace']);
end
if (exist([prefix '_npred']))
npred = eval([prefix '_npred']);
npred = eval([prefix '_npred']);
else
error(['Could not find variable ' prefix '_npred in workspace']);
error(['Could not find variable ' prefix '_npred in workspace']);
end
if (exist([prefix '_nboth']))
nboth = eval([prefix '_nboth']);
nboth = eval([prefix '_nboth']);
else
error(['Could not find variable ' prefix '_nboth in workspace']);
error(['Could not find variable ' prefix '_nboth in workspace']);
end
if (exist([prefix '_nforw']))
nforw = eval([prefix '_nforw']);
nforw = eval([prefix '_nforw']);
else
error(['Could not find variable ' prefix '_nforw in workspace']);
error(['Could not find variable ' prefix '_nforw in workspace']);
end
if (exist([prefix '_ss']))
ss = eval([prefix '_ss']);
ss = eval([prefix '_ss']);
else
error(['Could not find variable ' prefix '_ss in workspace']);
error(['Could not find variable ' prefix '_ss in workspace']);
end
if (exist([prefix '_vcov_exo']))
vcov_exo = eval([prefix '_vcov_exo']);
vcov_exo = eval([prefix '_vcov_exo']);
else
error(['Could not find variable ' prefix '_vcov_exo in workspace']);
error(['Could not find variable ' prefix '_vcov_exo in workspace']);
end
nexog = size(vcov_exo,1);
if isnan(ystart)
ystart = ss;
ystart = ss;
end
% newer version of dynare++ doesn't return prefix_g_0, we make it here if
% it does not exist in workspace
g_zero = [prefix '_g_0'];
if (~ exist(g_zero))
eval([ g_zero '= zeros(nstat+npred+nboth+nforw,1);']);
eval([ g_zero '= zeros(nstat+npred+nboth+nforw,1);']);
end
% make derstr a string of comma seperated existing prefix_g_*
@ -152,13 +152,13 @@ derstr = [',' g_zero];
order = 1;
cont = 1;
while cont == 1
g_ord = [prefix '_g_' num2str(order)];
if (exist(g_ord))
derstr = [derstr ',' g_ord];
order = order + 1;
else
cont = 0;
end
g_ord = [prefix '_g_' num2str(order)];
if (exist(g_ord))
derstr = [derstr ',' g_ord];
order = order + 1;
else
cont = 0;
end
end
% set seed

View File

@ -58,18 +58,19 @@ function [err, X, varargout] = gensylv(order, A, B, C, D)
% in Windows, ensure that aa_gensylv.dll is loaded, this prevents
% clearing the function and a successive Matlab crash
if strcmp('PCWIN', computer)
if ~ libisloaded('aa_gensylv')
loadlibrary('aa_gensylv', 'dummy');
end
if ~ libisloaded('aa_gensylv')
loadlibrary('aa_gensylv', 'dummy');
end
end
% launch aa_gensylv
if nargout == 2
X = aa_gensylv(order, A, B, C, D);
X = aa_gensylv(order, A, B, C, D);
elseif nargout == 3
[X, par] = aa_gensylv(order, A, B, C, D);
varargout(1) = {par};
[X, par] = aa_gensylv(order, A, B, C, D);
varargout(1) = {par};
else
error('Must have 2 or 3 output arguments.');
error('Must have 2 or 3 output arguments.');
end
err = 0;

View File

@ -17,8 +17,8 @@ global M_
% read out parameters to access them with their name
NumberOfParameters = M_.param_nbr;
for ii = 1:NumberOfParameters
paramname = M_.param_names{ii};
eval([ paramname ' = M_.params(' int2str(ii) ');']);
paramname = M_.param_names{ii};
eval([ paramname ' = M_.params(' int2str(ii) ');']);
end
% initialize indicator
check = 0;
@ -69,8 +69,8 @@ vw=(1-thetaw)/(1-thetaw*PI^((1-chiw)*eta)*mu_z^eta)*PIstarw^(-eta);
tempvaromega=alppha/(1-alppha)*w/r*mu_z*mu_I;
[ld,fval,exitflag]=fzero(@(ld)(1-betta*thetaw*mu_z^(eta-1)*PI^(-(1-chiw)*(1-eta)))/(1-betta*thetaw*mu_z^(eta*(1+gammma))*PI^(eta*(1-chiw)*(1+gammma)))...
-(eta-1)/eta*wstar/(varpsi*PIstarw^(-eta*gammma)*ld^gammma)*((1-h*mu_z^(-1))^(-1)-betta*h*(mu_z-h)^(-1))*...
((mu_A*mu_z^(-1)*vp^(-1)*tempvaromega^alppha-tempvaromega*(1-(1-delta)*(mu_z*mu_I)^(-1)))*ld-vp^(-1)*Phi)^(-1),0.25,options);
-(eta-1)/eta*wstar/(varpsi*PIstarw^(-eta*gammma)*ld^gammma)*((1-h*mu_z^(-1))^(-1)-betta*h*(mu_z-h)^(-1))*...
((mu_A*mu_z^(-1)*vp^(-1)*tempvaromega^alppha-tempvaromega*(1-(1-delta)*(mu_z*mu_I)^(-1)))*ld-vp^(-1)*Phi)^(-1),0.25,options);
if exitflag <1
%indicate the SS computation was not sucessful; this would also be detected by Dynare
%setting the indicator here shows how to use this functionality to

View File

@ -1,416 +1,416 @@
% Generated data, used by fs2000.mod
gy_obs =[
1.0030045
1.0002599
0.99104664
1.0321162
1.0223545
1.0043614
0.98626929
1.0092127
1.0357197
1.0150827
1.0051548
0.98465775
0.99132132
0.99904153
1.0044641
1.0179198
1.0113462
0.99409421
0.99904293
1.0448336
0.99932433
1.0057004
0.99619787
1.0267504
1.0077645
1.0058026
1.0025891
0.9939097
0.99604693
0.99908569
1.0151094
0.99348134
1.0039124
1.0145805
0.99800868
0.98578138
1.0065771
0.99843919
0.97979062
0.98413351
0.96468174
1.0273857
1.0225211
0.99958667
1.0111157
1.0099585
0.99480311
1.0079265
0.98924573
1.0070613
1.0075706
0.9937151
1.0224711
1.0018891
0.99051863
1.0042944
1.0184055
0.99419508
0.99756624
1.0015983
0.9845772
1.0004407
1.0116237
0.9861885
1.0073094
0.99273355
1.0013224
0.99777979
1.0301686
0.96809556
0.99917088
0.99949253
0.96590004
1.0083938
0.96662298
1.0221454
1.0069792
1.0343996
1.0066531
1.0072525
0.99743563
0.99723703
1.000372
0.99013917
1.0095223
0.98864268
0.98092242
0.98886488
1.0030341
1.01894
0.99155059
0.99533235
0.99734316
1.0047356
1.0082737
0.98425116
0.99949212
1.0055899
1.0065075
0.99385069
0.98867975
0.99804843
1.0184038
0.99301902
1.0177222
1.0051924
1.0187852
1.0098985
1.0097172
1.0145811
0.98721038
1.0361722
1.0105821
0.99469309
0.98626785
1.013871
0.99858924
0.99302637
1.0042186
0.99623745
0.98545708
1.0225435
1.0011861
1.0130321
0.97861347
1.0228193
0.99627435
1.0272779
1.0075172
1.0096762
1.0129306
0.99966549
1.0262882
1.0026914
1.0061475
1.009523
1.0036127
0.99762992
0.99092634
1.0058469
0.99887292
1.0060653
0.98673557
0.98895709
0.99111967
0.990118
0.99788054
0.97054709
1.0099157
1.0107431
0.99518695
1.0114048
0.99376019
1.0023369
0.98783327
1.0051727
1.0100462
0.98607387
1.0000064
0.99692442
1.012225
0.99574078
0.98642833
0.99008207
1.0197359
1.0112849
0.98711069
0.99402748
1.0242141
1.0135349
0.99842505
1.0130714
0.99887044
1.0059058
1.0185998
1.0073314
0.98687706
1.0084551
0.97698964
0.99482714
1.0015302
1.0105331
1.0261767
1.0232822
1.0084176
0.99785167
0.99619733
1.0055223
1.0076326
0.99205461
1.0030587
1.0137012
1.0145878
1.0190297
1.0000681
1.0153894
1.0140649
1.0007236
0.97961463
1.0125257
1.0169503
1.0197363
1.0221185
1.0030045
1.0002599
0.99104664
1.0321162
1.0223545
1.0043614
0.98626929
1.0092127
1.0357197
1.0150827
1.0051548
0.98465775
0.99132132
0.99904153
1.0044641
1.0179198
1.0113462
0.99409421
0.99904293
1.0448336
0.99932433
1.0057004
0.99619787
1.0267504
1.0077645
1.0058026
1.0025891
0.9939097
0.99604693
0.99908569
1.0151094
0.99348134
1.0039124
1.0145805
0.99800868
0.98578138
1.0065771
0.99843919
0.97979062
0.98413351
0.96468174
1.0273857
1.0225211
0.99958667
1.0111157
1.0099585
0.99480311
1.0079265
0.98924573
1.0070613
1.0075706
0.9937151
1.0224711
1.0018891
0.99051863
1.0042944
1.0184055
0.99419508
0.99756624
1.0015983
0.9845772
1.0004407
1.0116237
0.9861885
1.0073094
0.99273355
1.0013224
0.99777979
1.0301686
0.96809556
0.99917088
0.99949253
0.96590004
1.0083938
0.96662298
1.0221454
1.0069792
1.0343996
1.0066531
1.0072525
0.99743563
0.99723703
1.000372
0.99013917
1.0095223
0.98864268
0.98092242
0.98886488
1.0030341
1.01894
0.99155059
0.99533235
0.99734316
1.0047356
1.0082737
0.98425116
0.99949212
1.0055899
1.0065075
0.99385069
0.98867975
0.99804843
1.0184038
0.99301902
1.0177222
1.0051924
1.0187852
1.0098985
1.0097172
1.0145811
0.98721038
1.0361722
1.0105821
0.99469309
0.98626785
1.013871
0.99858924
0.99302637
1.0042186
0.99623745
0.98545708
1.0225435
1.0011861
1.0130321
0.97861347
1.0228193
0.99627435
1.0272779
1.0075172
1.0096762
1.0129306
0.99966549
1.0262882
1.0026914
1.0061475
1.009523
1.0036127
0.99762992
0.99092634
1.0058469
0.99887292
1.0060653
0.98673557
0.98895709
0.99111967
0.990118
0.99788054
0.97054709
1.0099157
1.0107431
0.99518695
1.0114048
0.99376019
1.0023369
0.98783327
1.0051727
1.0100462
0.98607387
1.0000064
0.99692442
1.012225
0.99574078
0.98642833
0.99008207
1.0197359
1.0112849
0.98711069
0.99402748
1.0242141
1.0135349
0.99842505
1.0130714
0.99887044
1.0059058
1.0185998
1.0073314
0.98687706
1.0084551
0.97698964
0.99482714
1.0015302
1.0105331
1.0261767
1.0232822
1.0084176
0.99785167
0.99619733
1.0055223
1.0076326
0.99205461
1.0030587
1.0137012
1.0145878
1.0190297
1.0000681
1.0153894
1.0140649
1.0007236
0.97961463
1.0125257
1.0169503
1.0197363
1.0221185
];
];
gp_obs =[
1.0079715
1.0115853
1.0167502
1.0068957
1.0138189
1.0258364
1.0243817
1.017373
1.0020171
1.0003742
1.0008974
1.0104804
1.0116393
1.0114294
0.99932124
0.99461459
1.0170349
1.0051446
1.020639
1.0051964
1.0093042
1.007068
1.01086
0.99590086
1.0014883
1.0117332
0.9990095
1.0108284
1.0103672
1.0036722
1.0005124
1.0190331
1.0130978
1.007842
1.0285436
1.0322054
1.0213403
1.0246486
1.0419306
1.0258867
1.0156316
0.99818589
0.9894107
1.0127584
1.0146882
1.0136529
1.0340107
1.0343652
1.02971
1.0077932
1.0198114
1.013971
1.0061083
1.0089573
1.0037926
1.0082071
0.99498155
0.99735772
0.98765026
1.006465
1.0196088
1.0053233
1.0119974
1.0188066
1.0029302
1.0183459
1.0034218
1.0158799
0.98824798
1.0274357
1.0168832
1.0180641
1.0294657
0.98864091
1.0358326
0.99889969
1.0178322
0.99813566
1.0073549
1.0215985
1.0084245
1.0080939
1.0157021
1.0075815
1.0032633
1.0117871
1.0209276
1.0077569
0.99680958
1.0120266
1.0017625
1.0138811
1.0198358
1.0059629
1.0115416
1.0319473
1.0167074
1.0116111
1.0048627
1.0217622
1.0125221
1.0142045
0.99792469
0.99823971
0.99561547
0.99850373
0.9898464
1.0030963
1.0051373
1.0004213
1.0144117
0.97185592
0.9959518
1.0073529
1.0051603
0.98642572
0.99433423
1.0112131
1.0007695
1.0176867
1.0134363
0.99926191
0.99879835
0.99878754
1.0331374
1.0077797
1.0127221
1.0047393
1.0074106
0.99784213
1.0056495
1.0057708
0.98817494
0.98742176
0.99930555
1.0000687
1.0129754
1.009529
1.0226731
1.0149534
1.0164295
1.0239469
1.0293458
1.026199
1.0197525
1.0126818
1.0054473
1.0254423
1.0069461
1.0153135
1.0337515
1.0178187
1.0240469
1.0079489
1.0186953
1.0008628
1.0113799
1.0140118
1.0168007
1.011441
0.98422774
0.98909729
1.0157859
1.0151586
0.99756232
0.99497777
1.0102841
1.0221659
0.9937759
0.99877193
1.0079433
0.99667692
1.0095959
1.0128804
1.0156949
1.0111951
1.0228887
1.0122083
1.0190197
1.0074927
1.0268096
0.99689352
0.98948474
1.0024938
1.0105543
1.014116
1.0141217
1.0056504
1.0101026
1.0105069
0.99619053
1.0059439
0.99449473
0.99482458
1.0037702
1.0068087
0.99575975
1.0030815
1.0334014
0.99879386
0.99625634
1.0171195
0.99233844
1.0079715
1.0115853
1.0167502
1.0068957
1.0138189
1.0258364
1.0243817
1.017373
1.0020171
1.0003742
1.0008974
1.0104804
1.0116393
1.0114294
0.99932124
0.99461459
1.0170349
1.0051446
1.020639
1.0051964
1.0093042
1.007068
1.01086
0.99590086
1.0014883
1.0117332
0.9990095
1.0108284
1.0103672
1.0036722
1.0005124
1.0190331
1.0130978
1.007842
1.0285436
1.0322054
1.0213403
1.0246486
1.0419306
1.0258867
1.0156316
0.99818589
0.9894107
1.0127584
1.0146882
1.0136529
1.0340107
1.0343652
1.02971
1.0077932
1.0198114
1.013971
1.0061083
1.0089573
1.0037926
1.0082071
0.99498155
0.99735772
0.98765026
1.006465
1.0196088
1.0053233
1.0119974
1.0188066
1.0029302
1.0183459
1.0034218
1.0158799
0.98824798
1.0274357
1.0168832
1.0180641
1.0294657
0.98864091
1.0358326
0.99889969
1.0178322
0.99813566
1.0073549
1.0215985
1.0084245
1.0080939
1.0157021
1.0075815
1.0032633
1.0117871
1.0209276
1.0077569
0.99680958
1.0120266
1.0017625
1.0138811
1.0198358
1.0059629
1.0115416
1.0319473
1.0167074
1.0116111
1.0048627
1.0217622
1.0125221
1.0142045
0.99792469
0.99823971
0.99561547
0.99850373
0.9898464
1.0030963
1.0051373
1.0004213
1.0144117
0.97185592
0.9959518
1.0073529
1.0051603
0.98642572
0.99433423
1.0112131
1.0007695
1.0176867
1.0134363
0.99926191
0.99879835
0.99878754
1.0331374
1.0077797
1.0127221
1.0047393
1.0074106
0.99784213
1.0056495
1.0057708
0.98817494
0.98742176
0.99930555
1.0000687
1.0129754
1.009529
1.0226731
1.0149534
1.0164295
1.0239469
1.0293458
1.026199
1.0197525
1.0126818
1.0054473
1.0254423
1.0069461
1.0153135
1.0337515
1.0178187
1.0240469
1.0079489
1.0186953
1.0008628
1.0113799
1.0140118
1.0168007
1.011441
0.98422774
0.98909729
1.0157859
1.0151586
0.99756232
0.99497777
1.0102841
1.0221659
0.9937759
0.99877193
1.0079433
0.99667692
1.0095959
1.0128804
1.0156949
1.0111951
1.0228887
1.0122083
1.0190197
1.0074927
1.0268096
0.99689352
0.98948474
1.0024938
1.0105543
1.014116
1.0141217
1.0056504
1.0101026
1.0105069
0.99619053
1.0059439
0.99449473
0.99482458
1.0037702
1.0068087
0.99575975
1.0030815
1.0334014
0.99879386
0.99625634
1.0171195
0.99233844
];
];

View File

@ -66,7 +66,9 @@ while notsteady && t<smpl
iF = inv(F);
K = P(:,mf)*iF;
lik(t) = log(det(F))+transpose(v)*iF*v;
[DK,DF,DP1] = computeDKalman(T,DT,DOm,P,DP,DH,mf,iF,K);
for ii = 1:k
Dv(:,ii) = -Da(mf,ii) - DYss(mf,ii);
Da(:,ii) = DT(:,:,ii)*(a+K*v) + T*(Da(:,ii)+DK(:,:,ii)*v + K*Dv(:,ii));
@ -147,4 +149,4 @@ for ii = 1:k
DP1(:,:,ii) = DT(:,:,ii)*tmp*T' + T*Dtmp*T' + T*tmp*DT(:,:,ii)' + DOm(:,:,ii);
end
% end of computeDKalman
% end of computeDKalman

View File

@ -1,5 +1,5 @@
function [r, g1] = block_bytecode_mfs_steadystate(y, b, y_all, exo, params, M)
% Wrapper around the static.m file, for use with dynare_solve,
% Wrapper around the *_static.m file, for use with dynare_solve,
% when block_mfs option is given to steady.
% Copyright (C) 2009-2012 Dynare Team

View File

@ -1,5 +1,5 @@
function [r, g1] = block_mfs_steadystate(y, b, y_all, exo, params, M)
% Wrapper around the static.m file, for use with dynare_solve,
% Wrapper around the *_static.m file, for use with dynare_solve,
% when block_mfs option is given to steady.
% Copyright (C) 2009-2012 Dynare Team

View File

@ -1,5 +1,5 @@
function [r, g1] = bytecode_steadystate(y, exo, params)
% Wrapper around the static.m file, for use with dynare_solve,
% Wrapper around the *_static.m file, for use with dynare_solve,
% when block_mfs option is given to steady.
% Copyright (C) 2009-2011 Dynare Team

View File

@ -64,6 +64,7 @@ for k=1:length(options.convergence.geweke.taper_steps)+1
sum_of_weights=sum(1./(NSE.^2),2);
pooled_mean=sum(means./(NSE.^2),2)./sum_of_weights;
pooled_NSE=1./sqrt(sum_of_weights);
test_stat=diff_Means.^2./sum(NSE.^2,2);
p = 1-chi2cdf(test_stat,1);
results_struct.pooled_mean(:,k) = pooled_mean;

View File

@ -685,6 +685,7 @@ for i = 1:Size
dr.ghu(endo, exo) = ghu;
data(i).pol.i_ghu = exo;
end
if (verbose)
disp('dr.ghx');
dr.ghx

View File

@ -1,5 +1,4 @@
function [info, info_irf, info_moment, data_irf, data_moment] = endogenous_prior_restrictions(T,R,Model,DynareOptions,DynareResults)
% Check for prior (sign) restrictions on irf's and theoretical moments
%
% INPUTS

View File

@ -98,4 +98,4 @@ plan.constrained_int_date_{i_ix} = [date(i1) - plan.date(1) + 1; plan.constraine
plan.constrained_paths_{i_ix} = [value(i1)'; plan.constrained_paths_{i_ix}(i2)];
else
error(['impossible case you have two conditional forecasts:\n - one involving ' plan.endo_names{plan.options_cond_fcst_.controlled_varexo(i_ix),:} ' as control and ' plan_exo_names{plan.constrained_vars_(ix_)} ' as constrined endogenous\n - the other involving ' plan.endo_names{plan.options_cond_fcst_.controlled_varexo(iy),:} ' as control and ' plan_exo_names{plan.constrained_vars_(ix)} ' as constrined endogenous\n']);
end
end

View File

@ -194,8 +194,8 @@ else
[U,T] = ordschur(U,T,e1);
T = T(k+1:end,k+1:end);
dyssdtheta = -U(:,k+1:end)*(T\U(:,k+1:end)')*df;
if nargout>5,
for j=1:length(indx),
if nargout>5
for j=1:length(indx)
d2yssdtheta(:,:,j) = -U(:,k+1:end)*(T\U(:,k+1:end)')*d2f(:,:,j);
end
end

View File

@ -2,7 +2,7 @@ function pick
%
% Copyright (C) 2001-2017 European Commission
% Copyright (C) 2017 DynareTeam
%
% This file is part of GLUEWIN
% GLUEWIN is a MATLAB code designed for analysing the output
% of Monte Carlo runs when empirical observations of the model output are available

View File

@ -117,4 +117,4 @@ for i = 1:npar
otherwise
% Nothing to do here.
end
end
end

View File

@ -46,4 +46,4 @@ plan.shock_perfect_foresight_ = [];
plan.options_cond_fcst_ = struct();
plan.options_cond_fcst_.parameter_set = 'calibration';
plan.options_cond_fcst_.simulation_type = 'deterministic';
plan.options_cond_fcst_.controlled_varexo = [];
plan.options_cond_fcst_.controlled_varexo = [];

View File

@ -207,4 +207,4 @@ for i=1:n1
m = m + 1;
end
end
end
end

View File

@ -168,4 +168,4 @@ else
A = cell2struct(VAL, FN);
A = reshape(A, sz0) ; % reshape into original format
end
end

View File

@ -153,4 +153,4 @@ ndraws2=10*ndraws1; % 2nd part of Monte Carlo draws
% end
% nstarts=1 % number of starting points
% imndraws = nstarts*ndraws2; % total draws for impulse responses or forecasts
%<<<<<<<<<<<<<<<<<<<
%<<<<<<<<<<<<<<<<<<<

View File

@ -21,4 +21,4 @@ end
if (regime(end)==1)
warning('Increase nperiods');
endx
end

View File

@ -46,4 +46,4 @@ wishlist = endog_;
nwishes = length(wishlist);
zdata_ = mkdata(nperiods,decrulea,decruleb,endog_,exog_,wishlist,irfshock,shockssequence);
zdata_ = mkdata(nperiods,decrulea,decruleb,endog_,exog_,wishlist,irfshock,shockssequence);

View File

@ -301,4 +301,4 @@ end
zdatapiecewise_(ishock_+1:end,:)=zdatalinear_(2:nperiods_-ishock_+1,:);
zdatalinear_ = mkdata(nperiods_,decrulea,decruleb,endog_,exog_,wishlist_,irfshock_,shockssequence_,init_orig_);
zdatalinear_ = mkdata(nperiods_,decrulea,decruleb,endog_,exog_,wishlist_,irfshock_,shockssequence_,init_orig_);

View File

@ -51,4 +51,4 @@ else
end
end
end
end

View File

@ -13,7 +13,7 @@ function [residuals,JJacobian] = perfect_foresight_mcp_problem(y, dynamic_functi
%
% INPUTS
% y [double] N*1 array, terminal conditions for the endogenous variables
% dynamic_function [handle] function handle to the dynamic routine
% dynamic_function [handle] function handle to _dynamic-file
% Y0 [double] N*1 array, initial conditions for the endogenous variables
% YT [double] N*1 array, terminal conditions for the endogenous variables
% exo_simul [double] nperiods*M_.exo_nbr matrix of exogenous variables (in declaration order)
@ -24,7 +24,7 @@ function [residuals,JJacobian] = perfect_foresight_mcp_problem(y, dynamic_functi
% T [scalar] number of simulation periods
% ny [scalar] number of endogenous variables
% i_cols [double] indices of variables appearing in M.lead_lag_incidence
% and that need to be passed to the dynamic routine
% and that need to be passed to _dynamic-file
% i_cols_J1 [double] indices of contemporaneous and forward looking variables
% appearing in M.lead_lag_incidence
% i_cols_1 [double] indices of contemporaneous and forward looking variables in

View File

@ -12,7 +12,7 @@ function [residuals,JJacobian] = perfect_foresight_problem(y, dynamic_function,
%
% INPUTS
% y [double] N*1 array, terminal conditions for the endogenous variables
% dynamic_function [handle] function handle to the dynamic routine
% dynamic_function [handle] function handle to _dynamic-file
% Y0 [double] N*1 array, initial conditions for the endogenous variables
% YT [double] N*1 array, terminal conditions for the endogenous variables
% exo_simul [double] nperiods*M_.exo_nbr matrix of exogenous variables (in declaration order)
@ -23,7 +23,7 @@ function [residuals,JJacobian] = perfect_foresight_problem(y, dynamic_function,
% T [scalar] number of simulation periods
% ny [scalar] number of endogenous variables
% i_cols [double] indices of variables appearing in M.lead_lag_incidence
% and that need to be passed to the dynamic routine
% and that need to be passed to _dynamic-file
% i_cols_J1 [double] indices of contemporaneous and forward looking variables
% appearing in M.lead_lag_incidence
% i_cols_1 [double] indices of contemporaneous and forward looking variables in

View File

@ -15,7 +15,7 @@ function [options, y0, yT, z, i_cols, i_cols_J1, i_cols_T, i_cols_j, i_cols_1, .
% - yT [double] N*1 array, terminal conditions for the endogenous variables
% - z [double] T*M array, paths for the exogenous variables.
% - i_cols [double] indices of variables appearing in M.lead_lag_incidence
% and that need to be passed to the dynamic routine
% and that need to be passed to _dynamic-file
% - i_cols_J1 [double] indices of contemporaneous and forward looking variables
% appearing in M.lead_lag_incidence
% - i_cols_T [double] columns of dynamic Jacobian related to
@ -25,7 +25,7 @@ function [options, y0, yT, z, i_cols, i_cols_J1, i_cols_T, i_cols_j, i_cols_1, .
% in dynamic Jacobian (relevant in intermediate periods)
% - i_cols_1 [double] indices of contemporaneous and forward looking variables in
% M.lead_lag_incidence in dynamic Jacobian (relevant in first period)
% - dynamicmodel [handle] function handle to the dynamic routine
% - dynamicmodel [handle] function handle to _dynamic-file
% Copyright (C) 2015-2017 Dynare Team
%

View File

@ -330,4 +330,4 @@ if any(~isreal(dyy))
disp('Last iteration provided complex number for the following variables:')
fprintf('%s, ', endo_names{:}),
fprintf('\n'),
end
end

View File

@ -180,4 +180,4 @@ end
% fxsim=[];
% end
% end
end
end

View File

@ -120,4 +120,4 @@ for ii = 1:k
DP1(:,:,ii) = DT(:,:,ii)*tmp*T' + T*Dtmp*T' + T*tmp*DT(:,:,ii)' + DOm(:,:,ii);
end
% end of computeDKalman
% end of computeDKalman

View File

@ -66,7 +66,7 @@ for it=1:npar
% -------------------------------------------------------
% 1. DRAW Z = ln[f(X0)] - EXP(1) where EXP(1)=-ln(U(0,1))
% 1. DRAW Z = ln[f(X0)] - EXP(1) where EXP(1)=-ln(U(0,1))
% THIS DEFINES THE SLICE S={x: z < ln(f(x))}
% -------------------------------------------------------
fxold = -feval(objective_function,theta,varargin{:});

View File

@ -146,4 +146,4 @@ if islog
ya=log(ya+yass);
yass=log(yass);
ya=ya-yass;
end
end

View File

@ -4,18 +4,18 @@ fid = fopen([M_.fname '_options.txt'],'wt');
nfields = fieldnames(options_);
fprintf(fid, '%d %d %d\n',size(nfields,1), size(options_,1), size(options_,2));
for i=1:size(nfields, 1)
disp(nfields(i));
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
if iscell(AA)
AA = cell2mat(AA);
end;
fprintf(fid, '%s\n', AA);
Z = getfield(options_, AA);
print_object(fid, Z);
disp(nfields(i));
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
if iscell(AA)
AA = cell2mat(AA);
end;
fprintf(fid, '%s\n', AA);
Z = getfield(options_, AA);
print_object(fid, Z);
end;
fclose(fid);
@ -23,14 +23,14 @@ fid = fopen([M_.fname '_M.txt'],'wt');
nfields = fields(M_);
fprintf(fid, '%d %d %d\n',size(nfields,1), size(M_,1), size(M_,2));
for i=1:size(nfields, 1)
disp(nfields(i));
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
fprintf(fid, '%s\n', AA);
print_object(fid, getfield(M_, AA));
disp(nfields(i));
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
fprintf(fid, '%s\n', AA);
print_object(fid, getfield(M_, AA));
end;
fclose(fid);
@ -39,65 +39,65 @@ fid = fopen([M_.fname '_oo.txt'],'wt');
nfields = fields(oo_);
fprintf(fid, '%d %d %d\n',size(nfields,1), size(oo_,1), size(oo_,2));
for i=1:size(nfields, 1)
disp(nfields(i));
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
if iscell(AA)
AA = cell2mat(AA);
end;
fprintf(fid, '%s\n', AA);
print_object(fid, getfield(oo_, AA));
disp(nfields(i));
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
if iscell(AA)
AA = cell2mat(AA);
end;
fprintf(fid, '%s\n', AA);
print_object(fid, getfield(oo_, AA));
end;
fclose(fid);
function print_object(fid, object_arg)
if iscell(object_arg)
object = cell2mat(object_arg);
else
object = object_arg;
end;
if isa(object,'float') == 1
fprintf(fid, '%d ', 0);
fprintf(fid, '%d %d\n',size(object,1), size(object,2));
fprintf(fid, '%f\n', object);
%for i=1:size(object, 2)
%for j=1:size(object, 1)
%fprintf(fid, '%f\n', object(i,j));
%end;
%end;
elseif isa(object,'char') == 1
fprintf(fid, '%d ', 3);
fprintf(fid, '%d %d\n',size(object,1), size(object,2));
%object
for i=1:size(object, 1)
%for i=1:size(object, 2)
fprintf(fid, '%s ', object(i,:));
%end;
%fprintf(fid, '\n');
end;
fprintf(fid, '\n');
elseif isa(object,'struct') == 1
fprintf(fid, '%d ', 5);
nfields = fields(object);
fprintf(fid, '%d %d %d\n',size(nfields,1), size(object,1), size(object,2));
for j=1:size(object, 1) * size(object, 2)
nfields = fields(object(j));
for i=1:size(nfields, 1)
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
fprintf(fid, '%s\n', AA);
print_object(fid, getfield(object, AA));
end;
end;
else
disp(['type ' object 'note handle']);
end;
if iscell(object_arg)
object = cell2mat(object_arg);
else
object = object_arg;
end;
if isa(object,'float') == 1
fprintf(fid, '%d ', 0);
fprintf(fid, '%d %d\n',size(object,1), size(object,2));
fprintf(fid, '%f\n', object);
%for i=1:size(object, 2)
%for j=1:size(object, 1)
%fprintf(fid, '%f\n', object(i,j));
%end;
%end;
elseif isa(object,'char') == 1
fprintf(fid, '%d ', 3);
fprintf(fid, '%d %d\n',size(object,1), size(object,2));
%object
for i=1:size(object, 1)
%for i=1:size(object, 2)
fprintf(fid, '%s ', object(i,:));
%end;
%fprintf(fid, '\n');
end;
fprintf(fid, '\n');
elseif isa(object,'struct') == 1
fprintf(fid, '%d ', 5);
nfields = fields(object);
fprintf(fid, '%d %d %d\n',size(nfields,1), size(object,1), size(object,2));
for j=1:size(object, 1) * size(object, 2)
nfields = fields(object(j));
for i=1:size(nfields, 1)
if iscell(nfields(i))
AA = cell2mat(nfields(i));
else
AA = nfields(i);
end;
fprintf(fid, '%s\n', AA);
print_object(fid, getfield(object, AA));
end;
end;
else
disp(['type ' object 'note handle']);
end;

View File

@ -2,7 +2,7 @@ function simulate_debug(steady_state)
global M_ oo_ options_;
fid = fopen([M_.fname '_options.txt'],'wt');
if steady_state~=1
fprintf(fid,'%d\n',options_.periods);
fprintf(fid,'%d\n',options_.periods);
end;
fprintf(fid,'%d\n',options_.simul.maxit);
fprintf(fid,'%6.20f\n',options_.slowc);
@ -17,11 +17,11 @@ fprintf(fid,'%d\n',M_.maximum_lead);
fprintf(fid,'%d\n',M_.maximum_endo_lag);
fprintf(fid,'%d\n',M_.param_nbr);
if steady_state==1
fprintf(fid,'%d\n',size(oo_.exo_steady_state, 1));
fprintf(fid,'%d\n',size(oo_.exo_steady_state, 2));
fprintf(fid,'%d\n',size(oo_.exo_steady_state, 1));
fprintf(fid,'%d\n',size(oo_.exo_steady_state, 2));
else
fprintf(fid,'%d\n',size(oo_.exo_simul, 1));
fprintf(fid,'%d\n',size(oo_.exo_simul, 2));
fprintf(fid,'%d\n',size(oo_.exo_simul, 1));
fprintf(fid,'%d\n',size(oo_.exo_simul, 2));
end;
fprintf(fid,'%d\n',M_.endo_nbr);
if steady_state==1
@ -41,11 +41,11 @@ fprintf(fid,'%6.20f\n',M_.params);
fclose(fid);
fid = fopen([M_.fname '_oo.txt'],'wt');
if steady_state==1
fprintf(fid,'%6.20f\n',oo_.steady_state);
fprintf(fid,'%6.20f\n',oo_.exo_steady_state);
fprintf(fid,'%6.20f\n',oo_.steady_state);
fprintf(fid,'%6.20f\n',oo_.exo_steady_state);
else
fprintf(fid,'%6.20f\n',oo_.endo_simul);
fprintf(fid,'%6.20f\n',oo_.exo_simul);
fprintf(fid,'%6.20f\n',oo_.endo_simul);
fprintf(fid,'%6.20f\n',oo_.exo_simul);
end;
fprintf(fid,'%6.20f\n',oo_.steady_state);
fprintf(fid,'%6.20f\n',oo_.exo_steady_state);

View File

@ -51,20 +51,20 @@ off=off+ nu;
n= ypart.ny+ypart.nboth;
%TwoDMatrix
matD=zeros(n,n);
% matD.place(fypzero,0,0);
% matD.place(fypzero,0,0);
matD(1:n-ypart.nboth,1:ypart.npred)= fypzero;
% matD.place(fybzero,0,ypart.npred);
% matD.place(fybzero,0,ypart.npred);
matD(1:n-ypart.nboth,ypart.npred+1:ypart.npred+ypart.nboth)=fybzero;
% matD.place(fyplus,0,ypart.nys()+ypart.nstat);
% matD.place(fyplus,0,ypart.nys()+ypart.nstat);
matD(1:n-ypart.nboth,ypart.nys+ypart.nstat+1:ypart.nys+ypart.nstat+ypart.nyss)=fyplus;
for i=1:ypart.nboth
matD(ypart.ny()+i,ypart.npred+i)= 1.0;
end
matE=[fymins, fyszero, zeros(n-ypart.nboth,ypart.nboth), fyfzero; zeros(ypart.nboth,n)];
% matE.place(fymins;
% matE.place(fyszero,0,ypart.nys());
% matE.place(fyfzero,0,ypart.nys()+ypart.nstat+ypart.nboth);
% matE.place(fymins;
% matE.place(fyszero,0,ypart.nys());
% matE.place(fyfzero,0,ypart.nys()+ypart.nstat+ypart.nboth);
for i= 1:ypart.nboth
matE(ypart.ny()+i,ypart.nys()+ypart.nstat+i)= -1.0;
@ -72,39 +72,39 @@ end
matE=-matE; %matE.mult(-1.0);
% vsl=zeros(n,n);
% vsr=zeros(n,n);
% lwork= 100*n+16;
% work=zeros(1,lwork);
% bwork=zeros(1,n);
% vsr=zeros(n,n);
% lwork= 100*n+16;
% work=zeros(1,lwork);
% bwork=zeros(1,n);
%int info;
% LAPACK_dgges("N","V","S",order_eigs,&n,matE.getData().base(),&n,
% matD.getData().base(),&n,&sdim,alphar.base(),alphai.base(),
% beta.base(),vsl.getData().base(),&n,vsr.getData().base(),&n,
% work.base(),&lwork,&(bwork[0]),&info);
% LAPACK_dgges("N","V","S",order_eigs,&n,matE.getData().base(),&n,
% matD.getData().base(),&n,&sdim,alphar.base(),alphai.base(),
% beta.base(),vsl.getData().base(),&n,vsr.getData().base(),&n,
% work.base(),&lwork,&(bwork[0]),&info);
[matE1,matD1,vsr,sdim,dr.eigval,info] = mjdgges(matE,matD,1);
bk_cond= (sdim==ypart.nys);
% ConstGeneralMatrix z11(vsr,0,0,ypart.nys(),ypart.nys());
% ConstGeneralMatrix z11(vsr,0,0,ypart.nys(),ypart.nys());
z11=vsr(1:ypart.nys,1:ypart.nys);
% ConstGeneralMatrix z12(vsr,0,ypart.nys(),ypart.nys(),n-ypart.nys());
% ConstGeneralMatrix z12(vsr,0,ypart.nys(),ypart.nys(),n-ypart.nys());
z12=vsr(1:ypart.nys(),ypart.nys+1:end);%, n-ypart.nys);
% ConstGeneralMatrix z21(vsr,ypart.nys(),0,n-ypart.nys(),ypart.nys());
% ConstGeneralMatrix z21(vsr,ypart.nys(),0,n-ypart.nys(),ypart.nys());
z21=vsr(ypart.nys+1:end,1:ypart.nys);
% ConstGeneralMatrix z22(vsr,ypart.nys(),ypart.nys(),n-ypart.nys(),n-ypart.nys());
% ConstGeneralMatrix z22(vsr,ypart.nys(),ypart.nys(),n-ypart.nys(),n-ypart.nys());
z22=vsr(ypart.nys+1:end,ypart.nys+1:end);
% GeneralMatrix sfder(z12,"transpose");
% GeneralMatrix sfder(z12,"transpose");
sfder=z12';%,"transpose");
% z22.multInvLeftTrans(sfder);
% z22.multInvLeftTrans(sfder);
sfder=z22'\sfder;
sfder=-sfder;% .mult(-1);
%s11(matE,0,0,ypart.nys(),ypart.nys());
s11=matE1(1:ypart.nys,1:ypart.nys);
% t11=(matD1,0,0,ypart.nys(),ypart.nys());
% t11=(matD1,0,0,ypart.nys(),ypart.nys());
t11=matD1(1:ypart.nys,1:ypart.nys);
dumm=(s11');%,"transpose");
%z11.multInvLeftTrans(dumm);
@ -115,15 +115,15 @@ preder=t11\preder;
%preder.multLeft(z11);
preder= z11*preder;
% gy.place(preder,ypart.nstat,0);
% gy=(zeros(ypart.nstat,size(preder,2)) ;preder);
% sder(sfder,0,0,ypart.nstat,ypart.nys());
% gy.place(preder,ypart.nstat,0);
% gy=(zeros(ypart.nstat,size(preder,2)) ;preder);
% sder(sfder,0,0,ypart.nstat,ypart.nys());
sder=sfder(1:ypart.nstat,1:ypart.nys);
% gy.place(sder,0,0);
% gy(1:ypart.nstat, 1:ypart.nys)=sder;
% gy.place(sder,0,0);
% gy(1:ypart.nstat, 1:ypart.nys)=sder;
% gy=[sder;preder];
% fder(sfder,ypart.nstat+ypart.nboth,0,ypart.nforw,ypart.nys());
% fder(sfder,ypart.nstat+ypart.nboth,0,ypart.nforw,ypart.nys());
fder=sfder(ypart.nstat+ypart.nboth+1:ypart.nstat+ypart.nboth+ypart.nforw,1:ypart.nys);
% gy.place(fder,ypart.nstat+ypart.nys(),0);
% gy(ypart.nstat+ypart.nys,1)=fder;
% gy.place(fder,ypart.nstat+ypart.nys(),0);
% gy(ypart.nstat+ypart.nys,1)=fder;
gy=[sder;preder;fder];

View File

@ -1,98 +1,98 @@
data = [0.928467646476 11.8716889412 20 0.418037507392 0.227382377518 ...
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
data = reshape(data,5,86)';
y_obs = data(:,1);
pie_obs = data(:,2);
R_obs = data(:,3);
de = data(:,4);
dq = data(:,5);
%Country: Canada
%Sample Range: 1981:2 to 2002:3
%Observations: 86

View File

@ -1,198 +1,198 @@
data_q = [
18.02 1474.5 150.2
17.94 1538.2 150.9
18.01 1584.5 151.4
18.42 1644.1 152
18.73 1678.6 152.7
19.46 1693.1 153.3
19.55 1724 153.9
19.56 1758.2 154.7
19.79 1760.6 155.4
19.77 1779.2 156
19.82 1778.8 156.6
20.03 1790.9 157.3
20.12 1846 158
20.1 1882.6 158.6
20.14 1897.3 159.2
20.22 1887.4 160
20.27 1858.2 160.7
20.34 1849.9 161.4
20.39 1848.5 162
20.42 1868.9 162.8
20.47 1905.6 163.6
20.56 1959.6 164.3
20.62 1994.4 164.9
20.78 2020.1 165.7
21 2030.5 166.5
21.2 2023.6 167.2
21.33 2037.7 167.9
21.62 2033.4 168.7
21.71 2066.2 169.5
22.01 2077.5 170.2
22.15 2071.9 170.9
22.27 2094 171.7
22.29 2070.8 172.5
22.56 2012.6 173.1
22.64 2024.7 173.8
22.77 2072.3 174.5
22.88 2120.6 175.3
22.92 2165 176.045
22.91 2223.3 176.727
22.94 2221.4 177.481
23.03 2230.95 178.268
23.13 2279.22 179.694
23.22 2265.48 180.335
23.32 2268.29 181.094
23.4 2238.57 181.915
23.45 2251.68 182.634
23.51 2292.02 183.337
23.56 2332.61 184.103
23.63 2381.01 184.894
23.75 2422.59 185.553
23.81 2448.01 186.203
23.87 2471.86 186.926
23.94 2476.67 187.68
24 2508.7 188.299
24.07 2538.05 188.906
24.12 2586.26 189.631
24.29 2604.62 190.362
24.35 2666.69 190.954
24.41 2697.54 191.56
24.52 2729.63 192.256
24.64 2739.75 192.938
24.77 2808.88 193.467
24.88 2846.34 193.994
25.01 2898.79 194.647
25.17 2970.48 195.279
25.32 3042.35 195.763
25.53 3055.53 196.277
25.79 3076.51 196.877
26.02 3102.36 197.481
26.14 3127.15 197.967
26.31 3129.53 198.455
26.6 3154.19 199.012
26.9 3177.98 199.572
27.21 3236.18 199.995
27.49 3292.07 200.452
27.75 3316.11 200.997
28.12 3331.22 201.538
28.39 3381.86 201.955
28.73 3390.23 202.419
29.14 3409.65 202.986
29.51 3392.6 203.584
29.94 3386.49 204.086
30.36 3391.61 204.721
30.61 3422.95 205.419
31.02 3389.36 206.13
31.5 3481.4 206.763
31.93 3500.95 207.362
32.27 3523.8 208
32.54 3533.79 208.642
33.02 3604.73 209.142
33.2 3687.9 209.637
33.49 3726.18 210.181
33.95 3790.44 210.737
34.36 3892.22 211.192
34.94 3919.01 211.663
35.61 3907.08 212.191
36.29 3947.11 212.708
37.01 3908.15 213.144
37.79 3922.57 213.602
38.96 3879.98 214.147
40.13 3854.13 214.7
41.05 3800.93 215.135
41.66 3835.21 215.652
42.41 3907.02 216.289
43.19 3952.48 216.848
43.69 4044.59 217.314
44.15 4072.19 217.776
44.77 4088.49 218.338
45.57 4126.39 218.917
46.32 4176.28 219.427
47.07 4260.08 219.956
47.66 4329.46 220.573
48.63 4328.33 221.201
49.42 4345.51 221.719
50.41 4510.73 222.281
51.27 4552.14 222.933
52.35 4603.65 223.583
53.51 4605.65 224.152
54.65 4615.64 224.737
55.82 4644.93 225.418
56.92 4656.23 226.117
58.18 4678.96 226.754
59.55 4566.62 227.389
61.01 4562.25 228.07
62.59 4651.86 228.689
64.15 4739.16 229.155
65.37 4696.82 229.674
66.65 4753.02 230.301
67.87 4693.76 230.903
68.86 4615.89 231.395
69.72 4634.88 231.906
70.66 4612.08 232.498
71.44 4618.26 233.074
72.08 4662.97 233.546
72.83 4763.57 234.028
73.48 4849 234.603
74.19 4939.23 235.153
75.02 5053.56 235.605
75.58 5132.87 236.082
76.25 5170.34 236.657
76.81 5203.68 237.232
77.63 5257.26 237.673
78.25 5283.73 238.176
78.76 5359.6 238.789
79.45 5393.57 239.387
79.81 5460.83 239.861
80.22 5466.95 240.368
80.84 5496.29 240.962
81.45 5526.77 241.539
82.09 5561.8 242.009
82.68 5618 242.52
83.33 5667.39 243.12
84.09 5750.57 243.721
84.67 5785.29 244.208
85.56 5844.05 244.716
86.66 5878.7 245.354
87.44 5952.83 245.966
88.45 6010.96 246.46
89.39 6055.61 247.017
90.13 6087.96 247.698
90.88 6093.51 248.374
92 6152.59 248.928
93.18 6171.57 249.564
94.14 6142.1 250.299
95.11 6078.96 251.031
96.27 6047.49 251.65
97 6074.66 252.295
97.7 6090.14 253.033
98.31 6105.25 253.743
99.13 6175.69 254.338
99.79 6214.22 255.032
100.17 6260.74 255.815
100.88 6327.12 256.543
101.84 6327.93 257.151
102.35 6359.9 257.785
102.83 6393.5 258.516
103.51 6476.86 259.191
104.13 6524.5 259.738
104.71 6600.31 260.351
105.39 6629.47 261.04
106.09 6688.61 261.692
106.75 6717.46 262.236
107.24 6724.2 262.847
107.75 6779.53 263.527
108.29 6825.8 264.169
108.91 6882 264.681
109.24 6983.91 265.258
109.74 7020 265.887
110.23 7093.12 266.491
111 7166.68 266.987
111.43 7236.5 267.545
111.76 7311.24 268.171
112.08 7364.63 268.815
];
18.02 1474.5 150.2
17.94 1538.2 150.9
18.01 1584.5 151.4
18.42 1644.1 152
18.73 1678.6 152.7
19.46 1693.1 153.3
19.55 1724 153.9
19.56 1758.2 154.7
19.79 1760.6 155.4
19.77 1779.2 156
19.82 1778.8 156.6
20.03 1790.9 157.3
20.12 1846 158
20.1 1882.6 158.6
20.14 1897.3 159.2
20.22 1887.4 160
20.27 1858.2 160.7
20.34 1849.9 161.4
20.39 1848.5 162
20.42 1868.9 162.8
20.47 1905.6 163.6
20.56 1959.6 164.3
20.62 1994.4 164.9
20.78 2020.1 165.7
21 2030.5 166.5
21.2 2023.6 167.2
21.33 2037.7 167.9
21.62 2033.4 168.7
21.71 2066.2 169.5
22.01 2077.5 170.2
22.15 2071.9 170.9
22.27 2094 171.7
22.29 2070.8 172.5
22.56 2012.6 173.1
22.64 2024.7 173.8
22.77 2072.3 174.5
22.88 2120.6 175.3
22.92 2165 176.045
22.91 2223.3 176.727
22.94 2221.4 177.481
23.03 2230.95 178.268
23.13 2279.22 179.694
23.22 2265.48 180.335
23.32 2268.29 181.094
23.4 2238.57 181.915
23.45 2251.68 182.634
23.51 2292.02 183.337
23.56 2332.61 184.103
23.63 2381.01 184.894
23.75 2422.59 185.553
23.81 2448.01 186.203
23.87 2471.86 186.926
23.94 2476.67 187.68
24 2508.7 188.299
24.07 2538.05 188.906
24.12 2586.26 189.631
24.29 2604.62 190.362
24.35 2666.69 190.954
24.41 2697.54 191.56
24.52 2729.63 192.256
24.64 2739.75 192.938
24.77 2808.88 193.467
24.88 2846.34 193.994
25.01 2898.79 194.647
25.17 2970.48 195.279
25.32 3042.35 195.763
25.53 3055.53 196.277
25.79 3076.51 196.877
26.02 3102.36 197.481
26.14 3127.15 197.967
26.31 3129.53 198.455
26.6 3154.19 199.012
26.9 3177.98 199.572
27.21 3236.18 199.995
27.49 3292.07 200.452
27.75 3316.11 200.997
28.12 3331.22 201.538
28.39 3381.86 201.955
28.73 3390.23 202.419
29.14 3409.65 202.986
29.51 3392.6 203.584
29.94 3386.49 204.086
30.36 3391.61 204.721
30.61 3422.95 205.419
31.02 3389.36 206.13
31.5 3481.4 206.763
31.93 3500.95 207.362
32.27 3523.8 208
32.54 3533.79 208.642
33.02 3604.73 209.142
33.2 3687.9 209.637
33.49 3726.18 210.181
33.95 3790.44 210.737
34.36 3892.22 211.192
34.94 3919.01 211.663
35.61 3907.08 212.191
36.29 3947.11 212.708
37.01 3908.15 213.144
37.79 3922.57 213.602
38.96 3879.98 214.147
40.13 3854.13 214.7
41.05 3800.93 215.135
41.66 3835.21 215.652
42.41 3907.02 216.289
43.19 3952.48 216.848
43.69 4044.59 217.314
44.15 4072.19 217.776
44.77 4088.49 218.338
45.57 4126.39 218.917
46.32 4176.28 219.427
47.07 4260.08 219.956
47.66 4329.46 220.573
48.63 4328.33 221.201
49.42 4345.51 221.719
50.41 4510.73 222.281
51.27 4552.14 222.933
52.35 4603.65 223.583
53.51 4605.65 224.152
54.65 4615.64 224.737
55.82 4644.93 225.418
56.92 4656.23 226.117
58.18 4678.96 226.754
59.55 4566.62 227.389
61.01 4562.25 228.07
62.59 4651.86 228.689
64.15 4739.16 229.155
65.37 4696.82 229.674
66.65 4753.02 230.301
67.87 4693.76 230.903
68.86 4615.89 231.395
69.72 4634.88 231.906
70.66 4612.08 232.498
71.44 4618.26 233.074
72.08 4662.97 233.546
72.83 4763.57 234.028
73.48 4849 234.603
74.19 4939.23 235.153
75.02 5053.56 235.605
75.58 5132.87 236.082
76.25 5170.34 236.657
76.81 5203.68 237.232
77.63 5257.26 237.673
78.25 5283.73 238.176
78.76 5359.6 238.789
79.45 5393.57 239.387
79.81 5460.83 239.861
80.22 5466.95 240.368
80.84 5496.29 240.962
81.45 5526.77 241.539
82.09 5561.8 242.009
82.68 5618 242.52
83.33 5667.39 243.12
84.09 5750.57 243.721
84.67 5785.29 244.208
85.56 5844.05 244.716
86.66 5878.7 245.354
87.44 5952.83 245.966
88.45 6010.96 246.46
89.39 6055.61 247.017
90.13 6087.96 247.698
90.88 6093.51 248.374
92 6152.59 248.928
93.18 6171.57 249.564
94.14 6142.1 250.299
95.11 6078.96 251.031
96.27 6047.49 251.65
97 6074.66 252.295
97.7 6090.14 253.033
98.31 6105.25 253.743
99.13 6175.69 254.338
99.79 6214.22 255.032
100.17 6260.74 255.815
100.88 6327.12 256.543
101.84 6327.93 257.151
102.35 6359.9 257.785
102.83 6393.5 258.516
103.51 6476.86 259.191
104.13 6524.5 259.738
104.71 6600.31 260.351
105.39 6629.47 261.04
106.09 6688.61 261.692
106.75 6717.46 262.236
107.24 6724.2 262.847
107.75 6779.53 263.527
108.29 6825.8 264.169
108.91 6882 264.681
109.24 6983.91 265.258
109.74 7020 265.887
110.23 7093.12 266.491
111 7166.68 266.987
111.43 7236.5 267.545
111.76 7311.24 268.171
112.08 7364.63 268.815
];
%GDPD GDPQ GPOP
series = zeros(193,2);

File diff suppressed because it is too large Load Diff

View File

@ -20,12 +20,12 @@ function run_ls2003(block, bytecode, solve_algo, stack_solve_algo)
disp(['TEST: ls2003 (block=' num2str(block) ', bytecode=' ...
num2str(bytecode) ', solve_algo=' num2str(solve_algo) ...
', stack_solve_algo=' num2str(stack_solve_algo) ')...']);
fid = fopen('ls2003_tmp.mod', 'w');
assert(fid > 0);
fprintf(fid, ['@#define block = %d\n@#define bytecode = %d\n' ...
'@#define solve_algo = %d\n@#define stack_solve_algo = %d\n' ...
'@#include \"ls2003.mod\"\n'], block, bytecode, ...
solve_algo, stack_solve_algo);
fclose(fid);
dynare('ls2003_tmp.mod','console')
fid = fopen('ls2003_tmp.mod', 'w');
assert(fid > 0);
fprintf(fid, ['@#define block = %d\n@#define bytecode = %d\n' ...
'@#define solve_algo = %d\n@#define stack_solve_algo = %d\n' ...
'@#include \"ls2003.mod\"\n'], block, bytecode, ...
solve_algo, stack_solve_algo);
fclose(fid);
dynare('ls2003_tmp.mod','console')
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
%read in the FV et al. policy functions derived from Mathematica
if ~isoctave() && ~matlab_ver_less_than('8.4')
websave('FV_2011_policyfunctions.mat','http://www.dynare.org/Datasets/FV_2011_policyfunctions.mat', weboptions('Timeout', 30))
websave('FV_2011_policyfunctions.mat','http://www.dynare.org/Datasets/FV_2011_policyfunctions.mat', weboptions('Timeout', 30))
else
urlwrite('http://www.dynare.org/Datasets/FV_2011_policyfunctions.mat','FV_2011_policyfunctions.mat')
urlwrite('http://www.dynare.org/Datasets/FV_2011_policyfunctions.mat','FV_2011_policyfunctions.mat')
end
load FV_2011_policyfunctions
@ -79,9 +79,9 @@ end
gxxx_dyn=zeros(size(gxxx));
for endo_iter_1=1:nx
for endo_iter_2=1:nx
for endo_iter_3=1:nx
for endo_iter_3=1:nx
gxxx_dyn(nu+endo_iter_1,nu+endo_iter_2,nu+endo_iter_3,:)=dr.ghxxx(FV_endo_order,(FV_endo_state_order(endo_iter_1)-1)*nx*nx+(FV_endo_state_order(endo_iter_2)-1)*nx+FV_endo_state_order(endo_iter_3));
end
end
end
end
@ -95,21 +95,21 @@ end
for endo_iter_1=1:nx
for endo_iter_2=1:nx
for exo_iter=1:nu
for exo_iter=1:nu
gxxx_dyn(nu+endo_iter_1,nu+endo_iter_2,exo_iter,:)=dr.ghxxu(FV_endo_order,(FV_endo_state_order(endo_iter_1)-1)*nx*nu+(FV_endo_state_order(endo_iter_2)-1)*nu+FV_exo_order(exo_iter));
gxxx_dyn(exo_iter,nu+endo_iter_2,nu+endo_iter_1,:)=dr.ghxxu(FV_endo_order,(FV_endo_state_order(endo_iter_1)-1)*nx*nu+(FV_endo_state_order(endo_iter_2)-1)*nu+FV_exo_order(exo_iter));
gxxx_dyn(nu+endo_iter_1,exo_iter,nu+endo_iter_2,:)=dr.ghxxu(FV_endo_order,(FV_endo_state_order(endo_iter_1)-1)*nx*nu+(FV_endo_state_order(endo_iter_2)-1)*nu+FV_exo_order(exo_iter));
end
end
end
end
for endo_iter_1=1:nx
for exo_iter_1=1:nu
for exo_iter_2=1:nu
for exo_iter_2=1:nu
gxxx_dyn(nu+endo_iter_1,exo_iter_1,exo_iter_2,:)=dr.ghxuu(FV_endo_order,(FV_endo_state_order(endo_iter_1)-1)*nu*nu+(FV_exo_order(exo_iter_1)-1)*nu+FV_exo_order(exo_iter_2));
gxxx_dyn(exo_iter_1,nu+endo_iter_1,exo_iter_2,:)=dr.ghxuu(FV_endo_order,(FV_endo_state_order(endo_iter_1)-1)*nu*nu+(FV_exo_order(exo_iter_1)-1)*nu+FV_exo_order(exo_iter_2));
gxxx_dyn(exo_iter_1,exo_iter_2,nu+endo_iter_1,:)=dr.ghxuu(FV_endo_order,(FV_endo_state_order(endo_iter_1)-1)*nu*nu+(FV_exo_order(exo_iter_1)-1)*nu+FV_exo_order(exo_iter_2));
end
end
end
end

View File

@ -1,8 +1,8 @@
function [ys, info] = ar_steadystate(ys, exogenous)
% Steady state routine for ar.mod (First order autoregressive process)
global M_
info = 0;
ys(1)=M_.params(2);

View File

@ -1,30 +1,30 @@
function y=exact_solution(M,oo,n)
beta = M.params(1);
theta = M.params(2);
rho = M.params(3);
xbar = M.params(4);
sigma2 = M.Sigma_e;
if beta*exp(theta*xbar+.5*theta^2*sigma2/(1-rho)^2)>1-eps
disp('The model doesn''t have a solution!')
return
end
i = 1:n;
a = theta*xbar*i+(theta^2*sigma2)/(2*(1-rho)^2)*(i-2*rho*(1-rho.^i)/(1-rho)+rho^2*(1-rho.^(2*i))/(1-rho^2));
b = theta*rho*(1-rho.^i)/(1-rho);
x = oo.endo_simul(2,:);
xhat = x-xbar;
n2 = size(x,2);
y = zeros(1,n2);
for j=1:n2
y(j) = sum(beta.^i.*exp(a+b*xhat(j)));
end
disp(sum(beta.^i.*exp(theta*xbar*i)))
disp(sum(beta.^i.*exp(a)))
beta = M.params(1);
theta = M.params(2);
rho = M.params(3);
xbar = M.params(4);
sigma2 = M.Sigma_e;
if beta*exp(theta*xbar+.5*theta^2*sigma2/(1-rho)^2)>1-eps
disp('The model doesn''t have a solution!')
return
end
i = 1:n;
a = theta*xbar*i+(theta^2*sigma2)/(2*(1-rho)^2)*(i-2*rho*(1-rho.^i)/(1-rho)+rho^2*(1-rho.^(2*i))/(1-rho^2));
b = theta*rho*(1-rho.^i)/(1-rho);
x = oo.endo_simul(2,:);
xhat = x-xbar;
n2 = size(x,2);
y = zeros(1,n2);
for j=1:n2
y(j) = sum(beta.^i.*exp(a+b*xhat(j)));
end
disp(sum(beta.^i.*exp(theta*xbar*i)))
disp(sum(beta.^i.*exp(a)))

View File

@ -1,61 +1,61 @@
function [ys_, params, info] = rbcii_steady_state(ys_, exo_, params)
function [ys_, params, info] = rbcii_steadystate2(ys_, exo_, params)
% Flag initialization (equal to zero if the deterministic steady state exists)
info = 0;
% efficiency
ys_(13)=0;
% Efficiency
ys_(12)=params(8);
% Steady state ratios
Output_per_unit_of_Capital=((1/params(1)-1+params(6))/params(4))^(1/(1-params(5)));
Consumption_per_unit_of_Capital=Output_per_unit_of_Capital-params(6);
Labour_per_unit_of_Capital=(((Output_per_unit_of_Capital/ys_(12))^params(5)-params(4))/(1-params(4)))^(1/params(5));
Output_per_unit_of_Labour=Output_per_unit_of_Capital/Labour_per_unit_of_Capital;
Consumption_per_unit_of_Labour=Consumption_per_unit_of_Capital/Labour_per_unit_of_Capital;
% Flag initialization (equal to zero if the deterministic steady state exists)
info = 0;
% Steady state share of capital revenues in total revenues (calibration check)
ShareOfCapital=params(4)/(params(4)+(1-params(4))*Labour_per_unit_of_Capital^params(5));
% efficiency
ys_(13)=0;
% Steady state level of labour
ys_(3)=1/(1+Consumption_per_unit_of_Labour/((1-params(4))*params(2)/(1-params(2))*Output_per_unit_of_Labour^(1-params(5))));
% Steady state level of consumption
ys_(4)=Consumption_per_unit_of_Labour*ys_(3);
% Steady state level of physical capital stock
ys_(1)=ys_(3)/Labour_per_unit_of_Capital;
% Steady state level of output
ys_(2)=Output_per_unit_of_Capital*ys_(1);
% Steady state level of investment
ys_(5)=params(6)*ys_(1);
% Steady state level of the expected term appearing in the Euler equation
ys_(14)=(ys_(4)^params(2)*(1-ys_(3))^(1-params(2)))^(1-params(3))/ys_(4)*(1+params(4)*(ys_(2)/ys_(1))^(1-params(5))-params(6));
% Efficiency
ys_(12)=params(8);
% Steady state level of output in the unconstrained regime (positive investment)
ys_(6)=ys_(2);
% Steady state ratios
Output_per_unit_of_Capital=((1/params(1)-1+params(6))/params(4))^(1/(1-params(5)));
Consumption_per_unit_of_Capital=Output_per_unit_of_Capital-params(6);
Labour_per_unit_of_Capital=(((Output_per_unit_of_Capital/ys_(12))^params(5)-params(4))/(1-params(4)))^(1/params(5));
Output_per_unit_of_Labour=Output_per_unit_of_Capital/Labour_per_unit_of_Capital;
Consumption_per_unit_of_Labour=Consumption_per_unit_of_Capital/Labour_per_unit_of_Capital;
% Steady state level of labour in the unconstrained regime
ys_(7)=ys_(3);
% Steady state level of consumption in the unconstrained regime
ys_(8)=ys_(4);
% Steady state level of labour in the constrained regime (noinvestment)
[lss,info] = l_solver(ys_(3),params(4),params(5),params(2),params(8),ys_(1),100);
if info, return, end
ys_(10) = lss;
% Steady state share of capital revenues in total revenues (calibration check)
ShareOfCapital=params(4)/(params(4)+(1-params(4))*Labour_per_unit_of_Capital^params(5));
% Steady state level of labour
ys_(3)=1/(1+Consumption_per_unit_of_Labour/((1-params(4))*params(2)/(1-params(2))*Output_per_unit_of_Labour^(1-params(5))));
% Steady state level of consumption
ys_(4)=Consumption_per_unit_of_Labour*ys_(3);
% Steady state level of physical capital stock
ys_(1)=ys_(3)/Labour_per_unit_of_Capital;
% Steady state level of output
ys_(2)=Output_per_unit_of_Capital*ys_(1);
% Steady state level of investment
ys_(5)=params(6)*ys_(1);
% Steady state level of the expected term appearing in the Euler equation
ys_(14)=(ys_(4)^params(2)*(1-ys_(3))^(1-params(2)))^(1-params(3))/ys_(4)*(1+params(4)*(ys_(2)/ys_(1))^(1-params(5))-params(6));
% Steady state level of output in the unconstrained regime (positive investment)
ys_(6)=ys_(2);
% Steady state level of labour in the unconstrained regime
ys_(7)=ys_(3);
% Steady state level of consumption in the unconstrained regime
ys_(8)=ys_(4);
% Steady state level of labour in the constrained regime (noinvestment)
[lss,info] = l_solver(ys_(3),params(4),params(5),params(2),params(8),ys_(1),100);
if info, return, end
ys_(10) = lss;
% Steady state level of consumption in the constrained regime
ys_(11)=params(8)*(params(4)*ys_(1)^params(5)+(1-params(4))*ys_(10)^params(5))^(1/params(5));
% Steady state level of output in the constrained regime
ys_(9)=ys_(11);
% Steady state level of consumption in the constrained regime
ys_(11)=params(8)*(params(4)*ys_(1)^params(5)+(1-params(4))*ys_(10)^params(5))^(1/params(5));
% Steady state level of output in the constrained regime
ys_(9)=ys_(11);
end
@ -63,26 +63,26 @@ end
function r = p0(labour,alpha,psi,theta,effstar,kstar)
r = labour * ( alpha*kstar^psi/labour^psi + 1-alpha + theta*(1-alpha)/(1-theta)/effstar^psi ) - theta*(1-alpha)/(1-theta)/effstar^psi;
r = labour * ( alpha*kstar^psi/labour^psi + 1-alpha + theta*(1-alpha)/(1-theta)/effstar^psi ) - theta*(1-alpha)/(1-theta)/effstar^psi;
end
function d = p1(labour,alpha,psi,theta,effstar,kstar)
d = alpha*(1-psi)*kstar^psi/labour^psi + 1-alpha + theta*(1-alpha)/(1-alpha)/effstar^psi;
d = alpha*(1-psi)*kstar^psi/labour^psi + 1-alpha + theta*(1-alpha)/(1-alpha)/effstar^psi;
end
function [labour,info] = l_solver(labour,alpha,psi,theta,effstar,kstar,maxiter)
iteration = 1; info = 0;
r = p0(labour,alpha,psi,theta,effstar,kstar);
condition = abs(r);
while condition
if iteration==maxiter
info = 1;
break
end
d = p1(labour,alpha,psi,theta,effstar,kstar);
labour = labour - r/d;
iteration = 1; info = 0;
r = p0(labour,alpha,psi,theta,effstar,kstar);
condition = abs(r)>1e-9;
iteration = iteration + 1;
end
condition = abs(r);
while condition
if iteration==maxiter
info = 1;
break
end
d = p1(labour,alpha,psi,theta,effstar,kstar);
labour = labour - r/d;
r = p0(labour,alpha,psi,theta,effstar,kstar);
condition = abs(r)>1e-9;
iteration = iteration + 1;
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
function [ys_, check_] = expectation_ss_old_steadystate(ys_orig_, exo_)
ys_=zeros(6,1);
global M_
ys_(4)=0;
ys_(6)=0;
ys_(5)=0.3333333333333333;
ys_(3)=((1/M_.params(1)-(1-M_.params(4)))/(M_.params(3)*ys_(5)^(1-M_.params(3))))^(1/(M_.params(3)-1));
ys_(1)=ys_(5)^(1-M_.params(3))*ys_(3)^M_.params(3);
ys_(2)=ys_(1)-M_.params(4)*ys_(3);
M_.params(5)=(1-M_.params(3))*ys_(1)/(ys_(2)*ys_(5)^(1+M_.params(6)));
check_=0;
ys_=zeros(6,1);
global M_
ys_(4)=0;
ys_(6)=0;
ys_(5)=0.3333333333333333;
ys_(3)=((1/M_.params(1)-(1-M_.params(4)))/(M_.params(3)*ys_(5)^(1-M_.params(3))))^(1/(M_.params(3)-1));
ys_(1)=ys_(5)^(1-M_.params(3))*ys_(3)^M_.params(3);
ys_(2)=ys_(1)-M_.params(4)*ys_(3);
M_.params(5)=(1-M_.params(3))*ys_(1)/(ys_(2)*ys_(5)^(1+M_.params(6)));
check_=0;
end

View File

@ -1,4 +1,4 @@
function fataltest(a,b,n)
if max(max(abs(a)-abs(b))) > 1e-5
function test(a,b,n)
if max(max(abs(a)-abs(b))) > 1e-5
error(['Test error in test ' int2str(n)])
end
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,416 +1,416 @@
% Generated data, used by fs2000.mod
gy_obs =[
NaN
1.0002599
0.99104664
1.0321162
1.0223545
1.0043614
0.98626929
1.0092127
1.0357197
1.0150827
1.0051548
0.98465775
0.99132132
0.99904153
1.0044641
1.0179198
1.0113462
0.99409421
0.99904293
1.0448336
0.99932433
1.0057004
0.99619787
1.0267504
1.0077645
1.0058026
1.0025891
0.9939097
0.99604693
0.99908569
1.0151094
0.99348134
1.0039124
1.0145805
0.99800868
0.98578138
1.0065771
0.99843919
0.97979062
0.98413351
0.96468174
1.0273857
1.0225211
0.99958667
1.0111157
1.0099585
0.99480311
1.0079265
0.98924573
1.0070613
1.0075706
0.9937151
1.0224711
1.0018891
0.99051863
1.0042944
1.0184055
0.99419508
0.99756624
1.0015983
0.9845772
1.0004407
1.0116237
0.9861885
1.0073094
0.99273355
1.0013224
0.99777979
1.0301686
0.96809556
0.99917088
0.99949253
0.96590004
1.0083938
0.96662298
1.0221454
1.0069792
1.0343996
1.0066531
1.0072525
0.99743563
0.99723703
1.000372
0.99013917
1.0095223
0.98864268
0.98092242
0.98886488
1.0030341
1.01894
0.99155059
0.99533235
0.99734316
1.0047356
1.0082737
0.98425116
0.99949212
1.0055899
1.0065075
0.99385069
0.98867975
0.99804843
1.0184038
0.99301902
1.0177222
1.0051924
1.0187852
1.0098985
1.0097172
1.0145811
0.98721038
1.0361722
1.0105821
0.99469309
0.98626785
1.013871
0.99858924
0.99302637
1.0042186
0.99623745
0.98545708
1.0225435
1.0011861
1.0130321
0.97861347
1.0228193
0.99627435
1.0272779
1.0075172
1.0096762
1.0129306
0.99966549
1.0262882
1.0026914
1.0061475
1.009523
1.0036127
0.99762992
0.99092634
1.0058469
0.99887292
1.0060653
0.98673557
0.98895709
0.99111967
0.990118
0.99788054
0.97054709
1.0099157
1.0107431
0.99518695
1.0114048
0.99376019
1.0023369
0.98783327
1.0051727
1.0100462
0.98607387
1.0000064
0.99692442
1.012225
0.99574078
0.98642833
0.99008207
1.0197359
1.0112849
0.98711069
0.99402748
1.0242141
1.0135349
0.99842505
1.0130714
0.99887044
1.0059058
1.0185998
1.0073314
0.98687706
1.0084551
0.97698964
0.99482714
1.0015302
1.0105331
1.0261767
1.0232822
1.0084176
0.99785167
0.99619733
1.0055223
1.0076326
0.99205461
1.0030587
1.0137012
1.0145878
1.0190297
1.0000681
1.0153894
1.0140649
1.0007236
0.97961463
1.0125257
1.0169503
NaN
1.0221185
NaN
1.0002599
0.99104664
1.0321162
1.0223545
1.0043614
0.98626929
1.0092127
1.0357197
1.0150827
1.0051548
0.98465775
0.99132132
0.99904153
1.0044641
1.0179198
1.0113462
0.99409421
0.99904293
1.0448336
0.99932433
1.0057004
0.99619787
1.0267504
1.0077645
1.0058026
1.0025891
0.9939097
0.99604693
0.99908569
1.0151094
0.99348134
1.0039124
1.0145805
0.99800868
0.98578138
1.0065771
0.99843919
0.97979062
0.98413351
0.96468174
1.0273857
1.0225211
0.99958667
1.0111157
1.0099585
0.99480311
1.0079265
0.98924573
1.0070613
1.0075706
0.9937151
1.0224711
1.0018891
0.99051863
1.0042944
1.0184055
0.99419508
0.99756624
1.0015983
0.9845772
1.0004407
1.0116237
0.9861885
1.0073094
0.99273355
1.0013224
0.99777979
1.0301686
0.96809556
0.99917088
0.99949253
0.96590004
1.0083938
0.96662298
1.0221454
1.0069792
1.0343996
1.0066531
1.0072525
0.99743563
0.99723703
1.000372
0.99013917
1.0095223
0.98864268
0.98092242
0.98886488
1.0030341
1.01894
0.99155059
0.99533235
0.99734316
1.0047356
1.0082737
0.98425116
0.99949212
1.0055899
1.0065075
0.99385069
0.98867975
0.99804843
1.0184038
0.99301902
1.0177222
1.0051924
1.0187852
1.0098985
1.0097172
1.0145811
0.98721038
1.0361722
1.0105821
0.99469309
0.98626785
1.013871
0.99858924
0.99302637
1.0042186
0.99623745
0.98545708
1.0225435
1.0011861
1.0130321
0.97861347
1.0228193
0.99627435
1.0272779
1.0075172
1.0096762
1.0129306
0.99966549
1.0262882
1.0026914
1.0061475
1.009523
1.0036127
0.99762992
0.99092634
1.0058469
0.99887292
1.0060653
0.98673557
0.98895709
0.99111967
0.990118
0.99788054
0.97054709
1.0099157
1.0107431
0.99518695
1.0114048
0.99376019
1.0023369
0.98783327
1.0051727
1.0100462
0.98607387
1.0000064
0.99692442
1.012225
0.99574078
0.98642833
0.99008207
1.0197359
1.0112849
0.98711069
0.99402748
1.0242141
1.0135349
0.99842505
1.0130714
0.99887044
1.0059058
1.0185998
1.0073314
0.98687706
1.0084551
0.97698964
0.99482714
1.0015302
1.0105331
1.0261767
1.0232822
1.0084176
0.99785167
0.99619733
1.0055223
1.0076326
0.99205461
1.0030587
1.0137012
1.0145878
1.0190297
1.0000681
1.0153894
1.0140649
1.0007236
0.97961463
1.0125257
1.0169503
NaN
1.0221185
];
];
gp_obs =[
1.0079715
1.0115853
1.0167502
1.0068957
1.0138189
1.0258364
1.0243817
1.017373
1.0020171
1.0003742
1.0008974
1.0104804
1.0116393
1.0114294
0.99932124
0.99461459
1.0170349
1.0051446
1.020639
1.0051964
1.0093042
1.007068
1.01086
NaN
1.0014883
1.0117332
0.9990095
1.0108284
1.0103672
1.0036722
1.0005124
1.0190331
1.0130978
1.007842
1.0285436
1.0322054
1.0213403
1.0246486
1.0419306
1.0258867
1.0156316
0.99818589
0.9894107
1.0127584
1.0146882
1.0136529
1.0340107
1.0343652
1.02971
1.0077932
1.0198114
1.013971
1.0061083
1.0089573
1.0037926
1.0082071
0.99498155
0.99735772
0.98765026
1.006465
1.0196088
1.0053233
1.0119974
1.0188066
1.0029302
1.0183459
1.0034218
1.0158799
0.98824798
1.0274357
1.0168832
1.0180641
1.0294657
0.98864091
1.0358326
0.99889969
1.0178322
0.99813566
1.0073549
1.0215985
1.0084245
1.0080939
1.0157021
1.0075815
1.0032633
1.0117871
1.0209276
1.0077569
0.99680958
1.0120266
1.0017625
1.0138811
1.0198358
1.0059629
1.0115416
1.0319473
1.0167074
1.0116111
1.0048627
1.0217622
1.0125221
1.0142045
0.99792469
0.99823971
0.99561547
0.99850373
0.9898464
1.0030963
1.0051373
1.0004213
1.0144117
0.97185592
0.9959518
1.0073529
1.0051603
0.98642572
0.99433423
1.0112131
1.0007695
1.0176867
1.0134363
0.99926191
0.99879835
0.99878754
1.0331374
1.0077797
1.0127221
1.0047393
1.0074106
0.99784213
1.0056495
1.0057708
0.98817494
0.98742176
0.99930555
1.0000687
1.0129754
1.009529
1.0226731
1.0149534
1.0164295
1.0239469
1.0293458
1.026199
1.0197525
1.0126818
1.0054473
1.0254423
1.0069461
1.0153135
1.0337515
1.0178187
1.0240469
1.0079489
1.0186953
1.0008628
1.0113799
1.0140118
1.0168007
1.011441
0.98422774
0.98909729
1.0157859
1.0151586
0.99756232
0.99497777
1.0102841
1.0221659
0.9937759
0.99877193
1.0079433
0.99667692
1.0095959
1.0128804
1.0156949
1.0111951
1.0228887
1.0122083
1.0190197
1.0074927
1.0268096
0.99689352
0.98948474
1.0024938
1.0105543
1.014116
1.0141217
1.0056504
1.0101026
1.0105069
0.99619053
1.0059439
0.99449473
0.99482458
1.0037702
1.0068087
0.99575975
1.0030815
1.0334014
0.99879386
0.99625634
NaN
0.99233844
1.0079715
1.0115853
1.0167502
1.0068957
1.0138189
1.0258364
1.0243817
1.017373
1.0020171
1.0003742
1.0008974
1.0104804
1.0116393
1.0114294
0.99932124
0.99461459
1.0170349
1.0051446
1.020639
1.0051964
1.0093042
1.007068
1.01086
NaN
1.0014883
1.0117332
0.9990095
1.0108284
1.0103672
1.0036722
1.0005124
1.0190331
1.0130978
1.007842
1.0285436
1.0322054
1.0213403
1.0246486
1.0419306
1.0258867
1.0156316
0.99818589
0.9894107
1.0127584
1.0146882
1.0136529
1.0340107
1.0343652
1.02971
1.0077932
1.0198114
1.013971
1.0061083
1.0089573
1.0037926
1.0082071
0.99498155
0.99735772
0.98765026
1.006465
1.0196088
1.0053233
1.0119974
1.0188066
1.0029302
1.0183459
1.0034218
1.0158799
0.98824798
1.0274357
1.0168832
1.0180641
1.0294657
0.98864091
1.0358326
0.99889969
1.0178322
0.99813566
1.0073549
1.0215985
1.0084245
1.0080939
1.0157021
1.0075815
1.0032633
1.0117871
1.0209276
1.0077569
0.99680958
1.0120266
1.0017625
1.0138811
1.0198358
1.0059629
1.0115416
1.0319473
1.0167074
1.0116111
1.0048627
1.0217622
1.0125221
1.0142045
0.99792469
0.99823971
0.99561547
0.99850373
0.9898464
1.0030963
1.0051373
1.0004213
1.0144117
0.97185592
0.9959518
1.0073529
1.0051603
0.98642572
0.99433423
1.0112131
1.0007695
1.0176867
1.0134363
0.99926191
0.99879835
0.99878754
1.0331374
1.0077797
1.0127221
1.0047393
1.0074106
0.99784213
1.0056495
1.0057708
0.98817494
0.98742176
0.99930555
1.0000687
1.0129754
1.009529
1.0226731
1.0149534
1.0164295
1.0239469
1.0293458
1.026199
1.0197525
1.0126818
1.0054473
1.0254423
1.0069461
1.0153135
1.0337515
1.0178187
1.0240469
1.0079489
1.0186953
1.0008628
1.0113799
1.0140118
1.0168007
1.011441
0.98422774
0.98909729
1.0157859
1.0151586
0.99756232
0.99497777
1.0102841
1.0221659
0.9937759
0.99877193
1.0079433
0.99667692
1.0095959
1.0128804
1.0156949
1.0111951
1.0228887
1.0122083
1.0190197
1.0074927
1.0268096
0.99689352
0.98948474
1.0024938
1.0105543
1.014116
1.0141217
1.0056504
1.0101026
1.0105069
0.99619053
1.0059439
0.99449473
0.99482458
1.0037702
1.0068087
0.99575975
1.0030815
1.0334014
0.99879386
0.99625634
NaN
0.99233844
];
];

View File

@ -1,4 +1,4 @@
function [W, e] = fs2000_ssfile_aux(l, n)
W = l/n;
e = 1;
W = l/n;
e = 1;
end

View File

@ -1,98 +1,98 @@
data = [0.928467646476 11.8716889412 20 0.418037507392 0.227382377518 ...
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
data = reshape(data,5,86)';
y_obs = data(:,1);
pie_obs = data(:,2);
R_obs = data(:,3);
de = data(:,4);
dq = data(:,5);
%Country: Canada
%Sample Range: 1981:2 to 2002:3
%Observations: 86

View File

@ -187,3 +187,4 @@ else
disp(['percentage dev. = ' num2str((LIK3/LIK2-1)*100)])
end
end

View File

@ -1,25 +1,25 @@
function observed_data = simul_state_space_model(T,R,Q,mf,nobs,H)
pp = length(mf);
mm = length(T);
rr = length(Q);
upper_cholesky_Q = chol(Q);
if nargin>5
upper_cholesky_H = chol(H);
end
state_data = zeros(mm,1);
if (nargin==5)
for t = 1:nobs
state_data = T*state_data + R* upper_cholesky_Q * randn(rr,1);
observed_data(:,t) = state_data(mf);
pp = length(mf);
mm = length(T);
rr = length(Q);
upper_cholesky_Q = chol(Q);
if nargin>5
upper_cholesky_H = chol(H);
end
elseif (nargin==6)
for t = 1:nobs
state_data = T*state_data + R* upper_cholesky_Q * randn(rr,1);
observed_data(:,t) = state_data(mf) + upper_cholesky_H * randn(pp,1);
end
else
error('simul_state_space_model:: I don''t understand what you want!!!')
end
state_data = zeros(mm,1);
if (nargin==5)
for t = 1:nobs
state_data = T*state_data + R* upper_cholesky_Q * randn(rr,1);
observed_data(:,t) = state_data(mf);
end
elseif (nargin==6)
for t = 1:nobs
state_data = T*state_data + R* upper_cholesky_Q * randn(rr,1);
observed_data(:,t) = state_data(mf) + upper_cholesky_H * randn(pp,1);
end
else
error('simul_state_space_model:: I don''t understand what you want!!!')
end

File diff suppressed because it is too large Load Diff

View File

@ -9,10 +9,10 @@ Pstar1(1,1) = 0;
Pstar1(4,1) = 0;
Pstar1(1,4) = 0;
[alphahat1,epsilonhat1,etahat1,a11, aK1] = DiffuseKalmanSmootherH1(T,R,Q,H, ...
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
[alphahat2,epsilonhat2,etahat2,a12, aK2] = DiffuseKalmanSmootherH3(T,R,Q,H, ...
Pinf1,Pstar1,Y,trend, ...
pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend, ...
pp,mm,smpl,mf);
max(max(abs(alphahat1-alphahat2)))
max(max(abs(epsilonhat1-epsilonhat2)))
max(max(abs(etahat1-etahat2)))
@ -21,10 +21,10 @@ max(max(abs(aK1-aK2)))
return
[alphahat1,etahat1,a11, aK1] = DiffuseKalmanSmoother1(T,R,Q, ...
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
[alphahat2,etahat2,a12, aK2] = DiffuseKalmanSmoother3(T,R,Q, ...
Pinf1,Pstar1,Y,trend, ...
pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend, ...
pp,mm,smpl,mf);
max(max(abs(alphahat1-alphahat2)))
@ -35,10 +35,10 @@ max(max(abs(a11-a12)))
H = zeros(size(H));
[alphahat1,etahat1,a11, aK1] = DiffuseKalmanSmoother1(T,R,Q, ...
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
[alphahat2,epsilonhat2,etahat2,a12, aK2] = DiffuseKalmanSmootherH1(T,R,Q,H, ...
Pinf1,Pstar1,Y,trend, ...
pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend, ...
pp,mm,smpl,mf);
max(max(abs(alphahat1-alphahat2)))
max(max(abs(etahat1-etahat2)))
max(max(abs(a11-a12)))
@ -46,9 +46,9 @@ max(max(abs(a11-a12)))
[alphahat1,etahat1,a11, aK1] = DiffuseKalmanSmoother3(T,R,Q, ...
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
[alphahat2,epsilonhat2,etahat2,a12, aK2] = DiffuseKalmanSmootherH3(T,R,Q, H, ...
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf);
max(max(abs(alphahat1-alphahat2)))
max(max(abs(etahat1-etahat2)))

View File

@ -11,11 +11,11 @@
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
pkg load io
pkg load optim
pkg load control
pkg load statistics
pkg load io
pkg load optim
pkg load control
pkg load statistics

View File

@ -1,98 +1,98 @@
data = [0.928467646476 11.8716889412 20 0.418037507392 0.227382377518 ...
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
data = reshape(data,5,86)';
y_obs = data(:,1);
pie_obs = data(:,2);
R_obs = data(:,3);
de = data(:,4);
dq = data(:,5);
%Country: Canada
%Sample Range: 1981:2 to 2002:3
%Observations: 86

View File

@ -1,98 +1,98 @@
data = [0.928467646476 11.8716889412 20 0.418037507392 0.227382377518 ...
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
data = reshape(data,5,86)';
y_obs = data(:,1);
pie_obs = data(:,2);
R_obs = data(:,3);
de = data(:,4);
dq = data(:,5);
%Country: Canada
%Sample Range: 1981:2 to 2002:3
%Observations: 86

View File

@ -1,416 +1,416 @@
% Generated data, used by fs2000.mod
gy_obs =[
1.0030045
1.0002599
0.99104664
1.0321162
1.0223545
1.0043614
0.98626929
1.0092127
1.0357197
1.0150827
1.0051548
0.98465775
0.99132132
0.99904153
1.0044641
1.0179198
1.0113462
0.99409421
0.99904293
1.0448336
0.99932433
1.0057004
0.99619787
1.0267504
1.0077645
1.0058026
1.0025891
0.9939097
0.99604693
0.99908569
1.0151094
0.99348134
1.0039124
1.0145805
0.99800868
0.98578138
1.0065771
0.99843919
0.97979062
0.98413351
0.96468174
1.0273857
1.0225211
0.99958667
1.0111157
1.0099585
0.99480311
1.0079265
0.98924573
1.0070613
1.0075706
0.9937151
1.0224711
1.0018891
0.99051863
1.0042944
1.0184055
0.99419508
0.99756624
1.0015983
0.9845772
1.0004407
1.0116237
0.9861885
1.0073094
0.99273355
1.0013224
0.99777979
1.0301686
0.96809556
0.99917088
0.99949253
0.96590004
1.0083938
0.96662298
1.0221454
1.0069792
1.0343996
1.0066531
1.0072525
0.99743563
0.99723703
1.000372
0.99013917
1.0095223
0.98864268
0.98092242
0.98886488
1.0030341
1.01894
0.99155059
0.99533235
0.99734316
1.0047356
1.0082737
0.98425116
0.99949212
1.0055899
1.0065075
0.99385069
0.98867975
0.99804843
1.0184038
0.99301902
1.0177222
1.0051924
1.0187852
1.0098985
1.0097172
1.0145811
0.98721038
1.0361722
1.0105821
0.99469309
0.98626785
1.013871
0.99858924
0.99302637
1.0042186
0.99623745
0.98545708
1.0225435
1.0011861
1.0130321
0.97861347
1.0228193
0.99627435
1.0272779
1.0075172
1.0096762
1.0129306
0.99966549
1.0262882
1.0026914
1.0061475
1.009523
1.0036127
0.99762992
0.99092634
1.0058469
0.99887292
1.0060653
0.98673557
0.98895709
0.99111967
0.990118
0.99788054
0.97054709
1.0099157
1.0107431
0.99518695
1.0114048
0.99376019
1.0023369
0.98783327
1.0051727
1.0100462
0.98607387
1.0000064
0.99692442
1.012225
0.99574078
0.98642833
0.99008207
1.0197359
1.0112849
0.98711069
0.99402748
1.0242141
1.0135349
0.99842505
1.0130714
0.99887044
1.0059058
1.0185998
1.0073314
0.98687706
1.0084551
0.97698964
0.99482714
1.0015302
1.0105331
1.0261767
1.0232822
1.0084176
0.99785167
0.99619733
1.0055223
1.0076326
0.99205461
1.0030587
1.0137012
1.0145878
1.0190297
1.0000681
1.0153894
1.0140649
1.0007236
0.97961463
1.0125257
1.0169503
1.0197363
1.0221185
1.0030045
1.0002599
0.99104664
1.0321162
1.0223545
1.0043614
0.98626929
1.0092127
1.0357197
1.0150827
1.0051548
0.98465775
0.99132132
0.99904153
1.0044641
1.0179198
1.0113462
0.99409421
0.99904293
1.0448336
0.99932433
1.0057004
0.99619787
1.0267504
1.0077645
1.0058026
1.0025891
0.9939097
0.99604693
0.99908569
1.0151094
0.99348134
1.0039124
1.0145805
0.99800868
0.98578138
1.0065771
0.99843919
0.97979062
0.98413351
0.96468174
1.0273857
1.0225211
0.99958667
1.0111157
1.0099585
0.99480311
1.0079265
0.98924573
1.0070613
1.0075706
0.9937151
1.0224711
1.0018891
0.99051863
1.0042944
1.0184055
0.99419508
0.99756624
1.0015983
0.9845772
1.0004407
1.0116237
0.9861885
1.0073094
0.99273355
1.0013224
0.99777979
1.0301686
0.96809556
0.99917088
0.99949253
0.96590004
1.0083938
0.96662298
1.0221454
1.0069792
1.0343996
1.0066531
1.0072525
0.99743563
0.99723703
1.000372
0.99013917
1.0095223
0.98864268
0.98092242
0.98886488
1.0030341
1.01894
0.99155059
0.99533235
0.99734316
1.0047356
1.0082737
0.98425116
0.99949212
1.0055899
1.0065075
0.99385069
0.98867975
0.99804843
1.0184038
0.99301902
1.0177222
1.0051924
1.0187852
1.0098985
1.0097172
1.0145811
0.98721038
1.0361722
1.0105821
0.99469309
0.98626785
1.013871
0.99858924
0.99302637
1.0042186
0.99623745
0.98545708
1.0225435
1.0011861
1.0130321
0.97861347
1.0228193
0.99627435
1.0272779
1.0075172
1.0096762
1.0129306
0.99966549
1.0262882
1.0026914
1.0061475
1.009523
1.0036127
0.99762992
0.99092634
1.0058469
0.99887292
1.0060653
0.98673557
0.98895709
0.99111967
0.990118
0.99788054
0.97054709
1.0099157
1.0107431
0.99518695
1.0114048
0.99376019
1.0023369
0.98783327
1.0051727
1.0100462
0.98607387
1.0000064
0.99692442
1.012225
0.99574078
0.98642833
0.99008207
1.0197359
1.0112849
0.98711069
0.99402748
1.0242141
1.0135349
0.99842505
1.0130714
0.99887044
1.0059058
1.0185998
1.0073314
0.98687706
1.0084551
0.97698964
0.99482714
1.0015302
1.0105331
1.0261767
1.0232822
1.0084176
0.99785167
0.99619733
1.0055223
1.0076326
0.99205461
1.0030587
1.0137012
1.0145878
1.0190297
1.0000681
1.0153894
1.0140649
1.0007236
0.97961463
1.0125257
1.0169503
1.0197363
1.0221185
];
];
gp_obs =[
1.0079715
1.0115853
1.0167502
1.0068957
1.0138189
1.0258364
1.0243817
1.017373
1.0020171
1.0003742
1.0008974
1.0104804
1.0116393
1.0114294
0.99932124
0.99461459
1.0170349
1.0051446
1.020639
1.0051964
1.0093042
1.007068
1.01086
0.99590086
1.0014883
1.0117332
0.9990095
1.0108284
1.0103672
1.0036722
1.0005124
1.0190331
1.0130978
1.007842
1.0285436
1.0322054
1.0213403
1.0246486
1.0419306
1.0258867
1.0156316
0.99818589
0.9894107
1.0127584
1.0146882
1.0136529
1.0340107
1.0343652
1.02971
1.0077932
1.0198114
1.013971
1.0061083
1.0089573
1.0037926
1.0082071
0.99498155
0.99735772
0.98765026
1.006465
1.0196088
1.0053233
1.0119974
1.0188066
1.0029302
1.0183459
1.0034218
1.0158799
0.98824798
1.0274357
1.0168832
1.0180641
1.0294657
0.98864091
1.0358326
0.99889969
1.0178322
0.99813566
1.0073549
1.0215985
1.0084245
1.0080939
1.0157021
1.0075815
1.0032633
1.0117871
1.0209276
1.0077569
0.99680958
1.0120266
1.0017625
1.0138811
1.0198358
1.0059629
1.0115416
1.0319473
1.0167074
1.0116111
1.0048627
1.0217622
1.0125221
1.0142045
0.99792469
0.99823971
0.99561547
0.99850373
0.9898464
1.0030963
1.0051373
1.0004213
1.0144117
0.97185592
0.9959518
1.0073529
1.0051603
0.98642572
0.99433423
1.0112131
1.0007695
1.0176867
1.0134363
0.99926191
0.99879835
0.99878754
1.0331374
1.0077797
1.0127221
1.0047393
1.0074106
0.99784213
1.0056495
1.0057708
0.98817494
0.98742176
0.99930555
1.0000687
1.0129754
1.009529
1.0226731
1.0149534
1.0164295
1.0239469
1.0293458
1.026199
1.0197525
1.0126818
1.0054473
1.0254423
1.0069461
1.0153135
1.0337515
1.0178187
1.0240469
1.0079489
1.0186953
1.0008628
1.0113799
1.0140118
1.0168007
1.011441
0.98422774
0.98909729
1.0157859
1.0151586
0.99756232
0.99497777
1.0102841
1.0221659
0.9937759
0.99877193
1.0079433
0.99667692
1.0095959
1.0128804
1.0156949
1.0111951
1.0228887
1.0122083
1.0190197
1.0074927
1.0268096
0.99689352
0.98948474
1.0024938
1.0105543
1.014116
1.0141217
1.0056504
1.0101026
1.0105069
0.99619053
1.0059439
0.99449473
0.99482458
1.0037702
1.0068087
0.99575975
1.0030815
1.0334014
0.99879386
0.99625634
1.0171195
0.99233844
1.0079715
1.0115853
1.0167502
1.0068957
1.0138189
1.0258364
1.0243817
1.017373
1.0020171
1.0003742
1.0008974
1.0104804
1.0116393
1.0114294
0.99932124
0.99461459
1.0170349
1.0051446
1.020639
1.0051964
1.0093042
1.007068
1.01086
0.99590086
1.0014883
1.0117332
0.9990095
1.0108284
1.0103672
1.0036722
1.0005124
1.0190331
1.0130978
1.007842
1.0285436
1.0322054
1.0213403
1.0246486
1.0419306
1.0258867
1.0156316
0.99818589
0.9894107
1.0127584
1.0146882
1.0136529
1.0340107
1.0343652
1.02971
1.0077932
1.0198114
1.013971
1.0061083
1.0089573
1.0037926
1.0082071
0.99498155
0.99735772
0.98765026
1.006465
1.0196088
1.0053233
1.0119974
1.0188066
1.0029302
1.0183459
1.0034218
1.0158799
0.98824798
1.0274357
1.0168832
1.0180641
1.0294657
0.98864091
1.0358326
0.99889969
1.0178322
0.99813566
1.0073549
1.0215985
1.0084245
1.0080939
1.0157021
1.0075815
1.0032633
1.0117871
1.0209276
1.0077569
0.99680958
1.0120266
1.0017625
1.0138811
1.0198358
1.0059629
1.0115416
1.0319473
1.0167074
1.0116111
1.0048627
1.0217622
1.0125221
1.0142045
0.99792469
0.99823971
0.99561547
0.99850373
0.9898464
1.0030963
1.0051373
1.0004213
1.0144117
0.97185592
0.9959518
1.0073529
1.0051603
0.98642572
0.99433423
1.0112131
1.0007695
1.0176867
1.0134363
0.99926191
0.99879835
0.99878754
1.0331374
1.0077797
1.0127221
1.0047393
1.0074106
0.99784213
1.0056495
1.0057708
0.98817494
0.98742176
0.99930555
1.0000687
1.0129754
1.009529
1.0226731
1.0149534
1.0164295
1.0239469
1.0293458
1.026199
1.0197525
1.0126818
1.0054473
1.0254423
1.0069461
1.0153135
1.0337515
1.0178187
1.0240469
1.0079489
1.0186953
1.0008628
1.0113799
1.0140118
1.0168007
1.011441
0.98422774
0.98909729
1.0157859
1.0151586
0.99756232
0.99497777
1.0102841
1.0221659
0.9937759
0.99877193
1.0079433
0.99667692
1.0095959
1.0128804
1.0156949
1.0111951
1.0228887
1.0122083
1.0190197
1.0074927
1.0268096
0.99689352
0.98948474
1.0024938
1.0105543
1.014116
1.0141217
1.0056504
1.0101026
1.0105069
0.99619053
1.0059439
0.99449473
0.99482458
1.0037702
1.0068087
0.99575975
1.0030815
1.0334014
0.99879386
0.99625634
1.0171195
0.99233844
];
];

View File

@ -49,7 +49,7 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free D+ parameters in ith equation in all states.
if (nargin==3)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
end
@ -59,10 +59,10 @@ k = kvar*nStates; % Maximum number of lagged and exogenous variables in each eq
Qi = zeros(n,n,nvar); % 3rd dim: nvar contemporaneous equations.
Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -77,47 +77,47 @@ Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
eqninx = 1;
nreseqn = 2; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 -1 0 0
0 1 0 0 -1 0
0 0 1 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 -1 0 0
0 1 0 0 -1 0
0 0 1 0 0 -1
0 0 0 0 1 0
0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 1 0
0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0
0 0 1 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 0 1 0
0 0 0 0 0 1
];
0 0 0 0 1 0
0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -125,61 +125,61 @@ end
eqninx = 2;
nreseqn = 1; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 -1 0 0
0 1 0 0 -1 0
0 0 1 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 -1 0 0
0 1 0 0 -1 0
0 0 1 0 0 -1
0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0
0 0 0 0 0 1
];
0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
end
@ -187,42 +187,42 @@ end
eqninx = 3;
nreseqn = 0; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 -1 0 0
0 1 0 0 -1 0
0 0 1 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 -1 0 0
0 1 0 0 -1 0
0 0 1 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
for ki=1:nvar % initializing loop for each equation
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
end

View File

@ -49,7 +49,7 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free D+ parameters in ith equation in all states.
if (nargin==3)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
end
@ -59,10 +59,10 @@ k = kvar*nStates; % Maximum number of lagged and exogenous variables in each eq
Qi = zeros(n,n,nvar); % 3rd dim: nvar contemporaneous equations.
Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -77,51 +77,51 @@ Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
eqninx = 1;
nreseqn = 3; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -129,65 +129,65 @@ end
eqninx = 2;
nreseqn = 2; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
end
@ -195,44 +195,44 @@ end
eqninx = 3;
nreseqn = 1; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 1 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -240,36 +240,36 @@ end
eqninx = 4;
nreseqn = 0; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
0 0 1 0 0 0 -1 0
0 0 0 1 0 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -324,8 +324,8 @@ end
for ki=1:nvar % initializing loop for each equation
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
end

View File

@ -49,7 +49,7 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free D+ parameters in ith equation in all states.
if (nargin==3)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
end
@ -59,10 +59,10 @@ k = kvar*nStates; % Maximum number of lagged and exogenous variables in each eq
Qi = zeros(n,n,nvar); % 3rd dim: nvar contemporaneous equations.
Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -77,59 +77,59 @@ Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
eqninx = 1;
nreseqn = 5; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -138,56 +138,56 @@ end
eqninx = 2;
nreseqn = 4; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -195,70 +195,70 @@ end
eqninx = 3;
nreseqn = 3; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
end
@ -266,49 +266,49 @@ end
eqninx = 4;
nreseqn = 2; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -316,46 +316,46 @@ end
eqninx = 5;
nreseqn = 1; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 0 1 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -363,38 +363,38 @@ end
eqninx = 6;
nreseqn = 0; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 -1 0 0 0 0 0
0 1 0 0 0 0 0 -1 0 0 0 0
0 0 1 0 0 0 0 0 -1 0 0 0
0 0 0 1 0 0 0 0 0 -1 0 0
0 0 0 0 1 0 0 0 0 0 -1 0
0 0 0 0 0 1 0 0 0 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -448,8 +448,8 @@ end
for ki=1:nvar % initializing loop for each equation
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
end

View File

@ -49,7 +49,7 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free D+ parameters in ith equation in all states.
if (nargin==3)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
end
@ -59,10 +59,10 @@ k = kvar*nStates; % Maximum number of lagged and exogenous variables in each eq
Qi = zeros(n,n,nvar); % 3rd dim: nvar contemporaneous equations.
Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
% Row corresponds to equation with nvar variables for state 1, ..., nvar variables for state nState.
% 0 means no restriction.
% 1 and -1 or any other number means the linear combination of the corresponding parameters is restricted to 0.
% 1 (only 1) means that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -77,63 +77,63 @@ Ri = zeros(k,k,nvar); % 1st and 2nd dims: lagged and exogenous equations.
eqninx = 1;
nreseqn = 6; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -141,60 +141,60 @@ end
eqninx = 2;
nreseqn = 5; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_*.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -202,57 +202,57 @@ end
eqninx = 3;
nreseqn = 4; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -261,71 +261,71 @@ end
eqninx = 4;
nreseqn = 3; % Number of linear restrictions for A0(:,eqninx) for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_3s_case3a.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
%==== For freely time-varying A+ for only the first 6 lags.
%==== Lagged restrictions: zeros on all lags except the first 6 lags in the MS equation.
% nlagsno0 = 6; % Number of lags to be nonzero.
% for si=1:nStates
% for ki = 1:lags-nlagsno0
% for kj=1:nvar
% Ri(kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,kvar*(si-1)+nlagsno0*nvar+nvar*(ki-1)+kj,2) = 1;
% end
% end
% end
%**** For constant D+_s except the first two lags and the constant term. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
% for si=1:nStates-1
% for ki=[2*nvar+1:kvar-1]
% Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
% end
% end
end
@ -333,50 +333,50 @@ end
eqninx = 5;
nreseqn = 2; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
0 0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -384,47 +384,47 @@ end
eqninx = 6;
nreseqn = 1; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 0 0 1 0 0 0 0 0 0 0
%**** For time-varying A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:nreseqn*nStates,:,eqninx) = [
0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
0 0 0 0 0 0 0 0 0 0 0 0 0 1
];
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -432,39 +432,39 @@ end
eqninx = 7;
nreseqn = 0; % Number of linear restrictions for the equation for each state.
if (indxEqnTv_m(eqninx, 2)<=2)
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
%**** For constant A0_s. In the order of [a0j(1),...,a0j(nStates)] for the 2nd dim of Qi.
Qi(1:(nStates-1)*nvar+nreseqn,:,eqninx) = [
1 0 0 0 0 0 0 -1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 -1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 -1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 -1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 -1 0 0
0 0 0 0 0 1 0 0 0 0 0 0 -1 0
0 0 0 0 0 0 1 0 0 0 0 0 0 -1
];
%**** For constant D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else % Time-varying equations at least for A0_s. For D+_s, constant-parameter equations in general.
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
%**** For D+_s. In the order of [aj+(1),...,aj+(nStates)] for the 2nd dim of Ri.
if (indxEqnTv_m(eqninx, 2)==3) % For constant D+** except the constant term. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar-1 % -1: no restrictions on the constant term, which is freely time-varying.
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
elseif (indxEqnTv_m(eqninx, 2)==4) % For constant D+**. In the order of [dj**(1),...,dj**(nStates)] for the 2nd dim of Ri.
for si=1:nStates-1
for ki=1:kvar
Ri(kvar*(si-1)+ki,[kvar*(si-1)+ki si*kvar+ki],eqninx) = [1 -1];
end
end
else
error('.../ftd_2s_caseall_simszha5v.m: Have not got time to deal with the simple case indxEqnTv_m(eqninx, 2)=5.')
end
end
@ -518,8 +518,8 @@ end
for ki=1:nvar % initializing loop for each equation
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
Ui{ki} = null(Qi(:,:,ki));
Vi{ki} = null(Ri(:,:,ki));
n0(ki) = size(Ui{ki},2);
np(ki) = size(Vi{ki},2);
end

View File

@ -1,4 +1,4 @@
function [Ui,Vi,n0,np,ixmC0Pres] = ftd_RSvensson_4v(lags,nvar,nexo,indxC0Pres)
function [Ui,Vi,n0,np,ixmC0Pres] = ftd_reac_function_4v(lags,nvar,nexo,indxC0Pres)
% vlist = [ff+ch fh dpgdp ffr)
%
% Exporting orthonormal matrices for the deterministic linear restrictions (equation by equation)
@ -50,17 +50,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -75,13 +75,13 @@ Qi(1:3,:,1) = [
0 1 0 0
0 0 1 0
0 0 0 1
];
];
%======== The second equation ===========
Qi(1:2,:,2) = [
0 0 1 0
0 0 0 1
];
];
%======== The third equation =========== NOTE THAT WE FORBID A
%CONTEMPORANEOUS IMPACT OF OUTPUTON PRICES TO AVOID A CONSTRAINT THAT
@ -90,7 +90,7 @@ Qi(1:3,:,3) = [
1 0 0 0
0 1 0 0
0 0 0 1
];
];
%======== The fourth equation ===========
@ -98,34 +98,34 @@ Qi(1:3,:,3) = [
% Restrictions on the A+ in order to focus strictly on the reaction fucntion
% indicates free parameterers X i
% Ap = [
% Ap = [
% X X X X
% X X X X
% X X X X
% -a1 -b1 X X
% a1 b1 0 X (1st lag)
% X X X X
% X X X X
% X X X X
% -a2 -b2 X X
% b2 b2 0 X (2nd lag)
% X 0 X X
% X X X X
% X X X X
% -a3 -b3 X X
% a3 a3 0 X (3rd lag)
% X X X X
% X X X X
% X X X X
% -a4 -b4 X X
% a4 b4 0 X (4th lag)
% X X X X (constant terms)
% ];
% ];
k=nvar*lags+nexo;
Ri = zeros(k,k,nvar);
% constraints on IS curve /conso+corporate investment
for nv=1:2
for ll=1:lags
Ri(ll,3+lags*(ll-1),nv)=1;
Ri(ll,4+lags*(ll-1),nv)=1;
end
for ll=1:lags
Ri(ll,3+lags*(ll-1),nv)=1;
Ri(ll,4+lags*(ll-1),nv)=1;
end
end
% constraints on IS curve /conso+corporate investment only on the long run
@ -140,15 +140,15 @@ end
% constraints on Ph curve / inflation does not react to interest rates
for ll=1:lags
Ri(ll,4+lags*(ll-1),3)=1;
Ri(ll,4+lags*(ll-1),3)=1;
end
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -159,30 +159,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -47,17 +47,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -69,146 +69,146 @@ Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
%The restrictions considered here are in the following form where X means unrestricted:
% A0 = [
% X 0 X X
% 0 X X X
% 0 0 X X
% 0 0 0 X
% ];
% Ap = [
% 0 X X X
% 0 0 X X
% 0 0 0 X
% ];
% Ap = [
% X 0 X X
% 0 X X X
% 0 X X X
% 0 0 X X
% 0 0 X X (1st lag)
% X 0 X X
% 0 X X X
% 0 X X X
% 0 0 X X
% 0 0 X X (2nd lag)
% X 0 X X
% 0 X X X
% 0 X X X
% 0 0 X X
% 0 0 X X (3rd lag)
% X 0 X X
% 0 X X X
% 0 X X X
% 0 0 X X
% 0 0 X X (4th lag)
% 0 X 0 0 (constant terms)
% ];
% ];
if (0)
%------------------------ Lower triangular A0 ------------------------------
%======== The first equation ===========
%------------------------ Lower triangular A0 ------------------------------
%======== The first equation ===========
%======== The second equation ===========
Qi(1:1,:,2) = [
1 0 0 0
];
%======== The second equation ===========
Qi(1:1,:,2) = [
1 0 0 0
];
%======== The third equation ===========
Qi(1:2,:,3) = [
1 0 0 0
0 1 0 0
];
%======== The third equation ===========
Qi(1:2,:,3) = [
1 0 0 0
0 1 0 0
];
%======== The fourth equation ===========
Qi(1:3,:,4) = [
1 0 0 0
0 1 0 0
0 0 1 0
];
%======== The fourth equation ===========
Qi(1:3,:,4) = [
1 0 0 0
0 1 0 0
0 0 1 0
];
else
%------------------------ Upper triangular A0 ------------------------------
%======== The first equation ===========
Qi(2:4,:,1) = [
0 1 0 0
0 0 1 0
0 0 0 1
];
%------------------------ Upper triangular A0 ------------------------------
%======== The first equation ===========
Qi(2:4,:,1) = [
0 1 0 0
0 0 1 0
0 0 0 1
];
%======== The second equation ===========
Qi([1 3:4],:,2) = [
1 0 0 0
0 0 1 0
0 0 0 1
];
%======== The second equation ===========
Qi([1 3:4],:,2) = [
1 0 0 0
0 0 1 0
0 0 0 1
];
%======== The third equation ===========
Qi(4:4,:,3) = [
0 0 0 1
];
%======== The third equation ===========
Qi(4:4,:,3) = [
0 0 0 1
];
%======== The fourth equation ===========
%======== The fourth equation ===========
end
%-------------------------- Lag restrictions. ------------------------------------------
if (1)
%--- Lag restrictions.
indxeqn = 1; %Which equation.
nrestrs = (nvar-1)*lags+1; %Number of restrictions.
vars_restr = [2:nvar]; %Variables that are restricted: id, ik, and y.
blags = zeros(nrestrs,k); %k=nvar*lags+1
cnt = 0;
for ki = 1:lags
for kj=vars_restr
cnt = cnt+1;
blags(cnt,nvar*(ki-1)+kj) = 1;
end
end
%--- Keep constant zero.
cnt = cnt+1;
blags(cnt,end) = 1; %Constant = 0.
if cnt~=nrestrs
error('Check lagged restrictions in 1st equation!')
end
Ri(1:nrestrs,:,indxeqn) = blags;
%--- Lag restrictions.
indxeqn = 1; %Which equation.
nrestrs = (nvar-1)*lags+1; %Number of restrictions.
vars_restr = [2:nvar]; %Variables that are restricted: id, ik, and y.
blags = zeros(nrestrs,k); %k=nvar*lags+1
cnt = 0;
for ki = 1:lags
for kj=vars_restr
cnt = cnt+1;
blags(cnt,nvar*(ki-1)+kj) = 1;
end
end
%--- Keep constant zero.
cnt = cnt+1;
blags(cnt,end) = 1; %Constant = 0.
if cnt~=nrestrs
error('Check lagged restrictions in 1st equation!')
end
Ri(1:nrestrs,:,indxeqn) = blags;
%--- Lag restrictions.
indxeqn = 2; %Which equation.
nrestrs = (nvar-1)*lags; %Number of restrictions.
vars_restr = [1 3:nvar]; %Variables that are restricted: id, ik, and y.
blags = zeros(nrestrs,k); %k=nvar*lags+1
cnt = 0;
for ki = 1:lags
for kj=vars_restr
cnt = cnt+1;
blags(cnt,nvar*(ki-1)+kj) = 1;
end
end
Ri(1:nrestrs,:,indxeqn) = blags;
%--- Lag restrictions.
indxeqn = 2; %Which equation.
nrestrs = (nvar-1)*lags; %Number of restrictions.
vars_restr = [1 3:nvar]; %Variables that are restricted: id, ik, and y.
blags = zeros(nrestrs,k); %k=nvar*lags+1
cnt = 0;
for ki = 1:lags
for kj=vars_restr
cnt = cnt+1;
blags(cnt,nvar*(ki-1)+kj) = 1;
end
end
Ri(1:nrestrs,:,indxeqn) = blags;
%--- Lag restrictions.
indxeqn = 3; %Which equation.
nrestrs = 1; %Number of restrictions.
blags = zeros(nrestrs,k);
cnt = 0;
%--- Keep constant zero.
cnt = cnt+1;
blags(cnt,end) = 1; %Constant = 0.
if cnt~=nrestrs
error('Check lagged restrictions in 1st equation!')
end
Ri(1:nrestrs,:,indxeqn) = blags;
%--- Lag restrictions.
indxeqn = 3; %Which equation.
nrestrs = 1; %Number of restrictions.
blags = zeros(nrestrs,k);
cnt = 0;
%--- Keep constant zero.
cnt = cnt+1;
blags(cnt,end) = 1; %Constant = 0.
if cnt~=nrestrs
error('Check lagged restrictions in 1st equation!')
end
Ri(1:nrestrs,:,indxeqn) = blags;
%--- Lag restrictions.
indxeqn = 4; %Which equation.
nrestrs = 1; %Number of restrictions.
blags = zeros(nrestrs,k);
cnt = 0;
%--- Keep constant zero.
cnt = cnt+1;
blags(cnt,end) = 1; %Constant = 0.
if cnt~=nrestrs
error('Check lagged restrictions in 1st equation!')
end
Ri(1:nrestrs,:,indxeqn) = blags;
%--- Lag restrictions.
indxeqn = 4; %Which equation.
nrestrs = 1; %Number of restrictions.
blags = zeros(nrestrs,k);
cnt = 0;
%--- Keep constant zero.
cnt = cnt+1;
blags(cnt,end) = 1; %Constant = 0.
if cnt~=nrestrs
error('Check lagged restrictions in 1st equation!')
end
Ri(1:nrestrs,:,indxeqn) = blags;
end
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -222,30 +222,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -1,4 +1,4 @@
function [Ui,Vi,n0,np,ixmC0Pres] = ftd_non_rec_5v(lags,nvar,nexo,indxC0Pres)
function [Ui,Vi,n0,np,ixmC0Pres] = ftd_upperchol5v(lags,nvar,nexo,indxC0Pres)
% vlist = [127 124 93 141 21]; % 1: GDP; 2: GDP deflator 124 (consumption deflator 79); 3: R; 4: M3 141 (M2 140); 5: exchange rate 21.
% varlist={'y', 'P', 'R', 'M3', 'Ex'};
%
@ -45,17 +45,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -71,20 +71,20 @@ Qi(1:4,:,1) = [
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
];
];
%======== The second equation ===========
Qi(1:3,:,2) = [
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
];
];
%======== The third equation ===========
Qi(1:2,:,3) = [
0 0 0 1 0
0 0 0 0 1
];
];
%======== The fourth equation ===========
@ -99,7 +99,7 @@ Qi(1:3,:,5) = [
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
];
];
@ -149,10 +149,10 @@ Qi(1:3,:,5) = [
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -163,30 +163,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -45,17 +45,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -75,30 +75,30 @@ Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% 0 0 0 0 1
% ]; % Respond to Pcom.
Qi(1:3,:,2) = [
1 0 0 0 0
0 0 0 1 0
0 0 0 0 1
]; % Not respond to Pcom.
1 0 0 0 0
0 0 0 1 0
0 0 0 0 1
]; % Not respond to Pcom.
%======== The third equation: money demand ===========
Qi(1,:,3) = [
1 0 0 0 0
];
1 0 0 0 0
];
%======== The fourth equation: y equation ===========
Qi(1:4,:,4) = [
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 0 1
];
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 0 1
];
%======== The fifth equation: p equation ===========
Qi(1:3,:,5) = [
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
];
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
];
%===== Lagged restrictions in foreign (Granger causing) block
@ -147,10 +147,10 @@ Qi(1:3,:,5) = [
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -161,30 +161,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -44,17 +44,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -69,12 +69,12 @@ Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
Qi(1:2,:,1) = [
0 1 0
0 0 1
];
];
%======== The second equation ===========
Qi(1:1,:,2) = [
0 0 1
];
];
%======== The third equation ===========
@ -127,10 +127,10 @@ Qi(1:1,:,2) = [
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -141,30 +141,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -45,17 +45,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -70,18 +70,18 @@ Qi(1:3,:,1) = [
0 1 0 0
0 0 1 0
0 0 0 1
];
];
%======== The second equation ===========
Qi(1:2,:,2) = [
0 0 1 0
0 0 0 1
];
];
%======== The third equation ===========
Qi(1:1,:,3) = [
0 0 0 1
];
];
%======== The fourth equation ===========
@ -135,10 +135,10 @@ Qi(1:1,:,3) = [
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -149,30 +149,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -45,17 +45,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -71,26 +71,26 @@ Qi(1:4,:,1) = [
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
];
];
%======== The second equation ===========
Qi(1:3,:,2) = [
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
];
];
%======== The third equation ===========
Qi(1:2,:,3) = [
0 0 0 1 0
0 0 0 0 1
];
];
%======== The fourth equation ===========
Qi(1:1,:,4) = [
0 0 0 0 1
];
];
%======== The fifth equation ===========
@ -144,10 +144,10 @@ Qi(1:1,:,4) = [
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -158,30 +158,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -45,17 +45,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -72,7 +72,7 @@ Qi(1:5,:,1) = [
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
];
];
%======== The second equation ===========
Qi(1:4,:,2) = [
@ -80,27 +80,27 @@ Qi(1:4,:,2) = [
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
];
];
%======== The third equation ===========
Qi(1:3,:,3) = [
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
];
];
%======== The fourth equation ===========
Qi(1:2,:,4) = [
0 0 0 0 1 0
0 0 0 0 0 1
];
];
%======== The fifth equation ===========
Qi(1:1,:,5) = [
0 0 0 0 0 1
];
];
%======== The sixth equation ===========
@ -151,10 +151,10 @@ Qi(1:1,:,5) = [
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -165,30 +165,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -45,17 +45,17 @@ n0 = zeros(nvar,1); % ith element represents the number of free A0 parameters in
np = zeros(nvar,1); % ith element represents the number of free A+ parameters in ith equation
if (nargin==2)
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
nexo = 1; % 1: constant as default where nexo must be a nonnegative integer
elseif (nargin==3)
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
indxC0Pres = 0; % default is no cross-A0-and-A+ restrictions.
end
k = lags*nvar+nexo; % maximum number of lagged and exogenous variables in each equation
Qi = zeros(nvar,nvar,nvar); % for nvar contemporaneous equations
Ri = zeros(k,k,nvar); % for nvar lagged and exogenous equations
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
% Row corresponds to equation. 0 means no restriction.
% 1 means exclusion restriction such that the corresponding parameter is restricted to 0.
%nfvar = 6; % number of foreign (Granger causing) variables
%nhvar = nvar-nfvar; % number of home (affected) variables.
@ -73,7 +73,7 @@ Qi(1:6,:,1) = [
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
];
];
%======== The second equation ===========
Qi(1:5,:,2) = [
@ -82,7 +82,7 @@ Qi(1:5,:,2) = [
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
];
];
%======== The third equation ===========
Qi(1:4,:,3) = [
@ -90,27 +90,27 @@ Qi(1:4,:,3) = [
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
];
];
%======== The fourth equation ===========
Qi(1:3,:,4) = [
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
];
];
%======== The fifth equation ===========
Qi(1:2,:,5) = [
0 0 0 0 0 1 0
0 0 0 0 0 0 1
];
];
%======== The sixth equation ===========
Qi(1:1,:,6) = [
0 0 0 0 0 0 1
];
];
%======== The seventh equation ===========
@ -161,10 +161,10 @@ Qi(1:1,:,6) = [
for n=1:nvar % initializing loop for each equation
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
Ui{n} = null(Qi(:,:,n));
Vi{n} = null(Ri(:,:,n));
n0(n) = size(Ui{n},2);
np(n) = size(Vi{n},2);
end
@ -175,30 +175,30 @@ end
%(2)-------------------------------------------------------------
%
if indxC0Pres
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
neq_cres = 3; % the number of equations in which cross-A0-A+ restrictions occur.
ixmC0Pres = cell(neq_cres,1); % in each cell representing equation, we have 4 columns:
% 1st: the jth column (equation) of A+ or A0: f_j or a_j
% 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% 4th: the number s such that f_j(i) = s * a_j(h) holds.
%** 1st equation
ixmC0Pres{1} = [1 2 2 1
1 7 1 1];
%** 2nd equation
ixmC0Pres{2} = [2 2 2 2];
%** 3rd equation
ixmC0Pres{3} = [3 7 1 1
3 2 2 1];
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 4 columns.
% ncres = 5; % manually key in the number of cross-A0-A+ restrictions
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
% % 1st: the jth column (equation) of A+ or A0: f_j or a_j
% % 2nd: the ith element f_j(i) -- the ith element in the jth column of A+
% % 3rd: the hth element a_j(h) -- the hth element in the jth column of A0
% % 4th: the number s such that f_j(i) = s * a_j(h) holds.
else
ixmC0Pres = NaN;
ixmC0Pres = NaN;
end

View File

@ -1,193 +1,193 @@
sbvar_data = [
-9.3174834887745916e-003, 1.7994658843431877e-002, 2.5699999999999997e-002;
7.7668705855149511e-003, 6.0096276044880881e-003, 3.0800000000000001e-002;
-1.9541593158383108e-003, 1.1443694953360728e-002, 3.5799999999999998e-002;
-7.3230760374594084e-003, 1.6080663886388402e-002, 3.9900000000000005e-002;
5.7366104256297845e-003, 9.6254961625830138e-003, 3.9300000000000002e-002;
-8.3093609995312789e-003, 1.7721697565065142e-002, 3.7000000000000005e-002;
-1.5818734568909143e-002, 1.8802248364432783e-002, 2.9399999999999999e-002;
-3.8114188274117389e-002, 1.7753163941062411e-002, 2.3000000000000000e-002;
-4.1399862204639426e-002, 4.5389998028741996e-003, 2.0000000000000000e-002;
-3.2217707697825837e-002, 7.3753322217300354e-003, 1.7299999999999999e-002;
-2.5646357007195419e-002, 1.0583418386522991e-002, 1.6799999999999999e-002;
-1.4897222570872337e-002, 1.0366269881014523e-002, 2.4000000000000000e-002;
-6.6220480083236666e-003, 2.3042923285839567e-002, 2.4600000000000000e-002;
-5.3027079623060303e-003, 1.0468178907987236e-002, 2.6099999999999998e-002;
-5.7275387773225717e-003, 1.0815248301383029e-002, 2.8500000000000001e-002;
-1.2909019643277730e-002, 1.3963993831495269e-002, 2.9200000000000000e-002;
-9.6082193296807006e-003, 1.1306915202373702e-002, 2.9700000000000001e-002;
-6.9847294194245180e-003, 4.0554812275257479e-003, 2.9600000000000001e-002;
1.8176103434601742e-003, 7.3752799189321649e-003, 3.3300000000000003e-002;
-4.5038023245602687e-004, 2.3887283546807359e-002, 3.4500000000000003e-002;
1.1624668564948593e-002, 1.4307761419874110e-002, 3.4599999999999999e-002;
1.2948656776092804e-002, 1.3154713006571006e-002, 3.4900000000000000e-002;
1.6160285046599832e-002, 1.9531653948000383e-002, 3.4599999999999999e-002;
8.4081398395898788e-003, 1.8522230201726275e-002, 3.5799999999999998e-002;
2.2153370885423129e-002, 1.7709079726716315e-002, 3.9699999999999999e-002;
2.4844201757035833e-002, 1.7812125625833675e-002, 4.0800000000000003e-002;
3.4050690186470334e-002, 1.7733161216544779e-002, 4.0700000000000000e-002;
4.6893307071320223e-002, 2.4854086852623247e-002, 4.1700000000000001e-002;
5.9972460768834779e-002, 2.4879959563927745e-002, 4.5599999999999995e-002;
5.2289186415585220e-002, 3.7979469553559353e-002, 4.9100000000000005e-002;
4.7741188658148914e-002, 3.9049003040727781e-002, 5.4100000000000002e-002;
4.4667561574096126e-002, 3.5671179948047138e-002, 5.5599999999999997e-002;
4.2427836565945398e-002, 1.9374879269963063e-002, 4.8200000000000000e-002;
3.1462874033119093e-002, 2.5309792721300628e-002, 3.9900000000000005e-002;
2.8437659950142802e-002, 3.7210113920888466e-002, 3.8900000000000004e-002;
2.5156025048538311e-002, 4.4947363315081201e-002, 4.1700000000000001e-002;
3.4855619579102992e-002, 4.3766256282161686e-002, 4.7899999999999998e-002;
4.1146105898716812e-002, 4.5485089147871749e-002, 5.9800000000000006e-002;
3.7608522339491302e-002, 3.9312213398265738e-002, 5.9400000000000001e-002;
3.1755688168807694e-002, 5.7147340097736921e-002, 5.9200000000000003e-002;
3.7547536338742304e-002, 4.0820102882030529e-002, 6.5700000000000008e-002;
3.0780798807969134e-002, 5.4795099957268389e-002, 8.3299999999999999e-002;
2.7622883356809069e-002, 5.9674785474016057e-002, 8.9800000000000005e-002;
1.3687491471252144e-002, 5.1526594947709725e-002, 8.9399999999999993e-002;
3.0365204590552253e-003, 5.7110106004252703e-002, 8.5699999999999998e-002;
-3.8946120840908094e-003, 5.8310720503999880e-002, 7.8799999999999995e-002;
-3.7031729362304588e-003, 3.2162694194911579e-002, 6.7000000000000004e-002;
-2.2953853215847531e-002, 5.2193859691229916e-002, 5.5700000000000000e-002;
-3.9774834192911612e-003, 6.1343390594280400e-002, 3.8599999999999995e-002;
-6.6430088990969693e-003, 5.4548116487401987e-002, 4.5599999999999995e-002;
-6.9966828696923500e-003, 4.0591135320590110e-002, 5.4699999999999999e-002;
-1.2347397716578001e-002, 3.2276797966984239e-002, 4.7500000000000001e-002;
-2.9473495209533240e-003, 6.7805039825567626e-002, 3.5400000000000001e-002;
1.2120764500071601e-002, 2.3686434724627725e-002, 4.2999999999999997e-002;
1.3231348379735053e-002, 3.7187744116042420e-002, 4.7400000000000005e-002;
2.0987028138604202e-002, 4.7889363970077925e-002, 5.1399999999999994e-002;
3.7485754706574781e-002, 5.3965548807981989e-002, 6.5400000000000000e-002;
4.0318879693293397e-002, 6.8340638829176292e-002, 7.8200000000000006e-002;
2.6218511286559831e-002, 7.8958874043481897e-002, 1.0560000000000000e-001;
2.6929695576288992e-002, 7.0997794665009550e-002, 1.0000000000000001e-001;
9.4554586277908470e-003, 8.4242699131246379e-002, 9.3200000000000005e-002;
3.6174737897027853e-003, 9.1565984601668537e-002, 1.1250000000000000e-001;
-1.4685635040370570e-002, 1.2944791465588246e-001, 1.2089999999999999e-001;
-2.7095820218557165e-002, 1.2813135610460602e-001, 9.3500000000000000e-002;
-4.7490291499844517e-002, 9.5634229266530868e-002, 6.3000000000000000e-002;
-4.8493379593802288e-002, 6.0105697293320492e-002, 5.4199999999999998e-002;
-3.9943449805699416e-002, 7.6752303729665350e-002, 6.1600000000000002e-002;
-3.5077206071779443e-002, 7.2995258807648344e-002, 5.4100000000000002e-002;
-2.0906071356066036e-002, 4.5679585226099162e-002, 4.8300000000000003e-002;
-2.1531096410072337e-002, 4.3592360792875207e-002, 5.2000000000000005e-002;
-2.4735476775209264e-002, 5.5187881222506396e-002, 5.2800000000000000e-002;
-2.5561529099840996e-002, 7.0182306554444240e-002, 4.8700000000000000e-002;
-2.1575901985043444e-002, 6.8358747781264828e-002, 4.6600000000000003e-002;
-1.0282812897440152e-002, 6.5803889922906311e-002, 5.1600000000000000e-002;
-9.1324207260257140e-004, 5.6172786341162295e-002, 5.8200000000000002e-002;
-9.5486836624303351e-003, 6.9205174325260410e-002, 6.5099999999999991e-002;
-1.4957543819619445e-002, 6.8508819756844419e-002, 6.7599999999999993e-002;
1.5069561708809687e-002, 7.9300571687745292e-002, 7.2800000000000004e-002;
1.6283475252537372e-002, 7.0872150059167804e-002, 8.1000000000000003e-002;
2.0908466837013862e-002, 8.4120663761548808e-002, 9.5799999999999996e-002;
1.4559374240283418e-002, 7.4654989747748868e-002, 1.0070000000000000e-001;
7.4026792768986382e-003, 1.0065048845414548e-001, 1.0180000000000000e-001;
6.7867658044900026e-003, 8.4869122045493794e-002, 1.0949999999999999e-001;
2.0964569874966088e-003, 8.1073829867721159e-002, 1.3580000000000000e-001;
-2.1618734445638665e-003, 9.0701460926355892e-002, 1.5049999999999999e-001;
-2.9866760868227260e-002, 9.1306883112545645e-002, 1.2689999999999999e-001;
-3.8807200394211705e-002, 9.3833166941218682e-002, 9.8400000000000001e-002;
-2.7491967650325577e-002, 1.1718934484063248e-001, 1.5850000000000000e-001;
-1.4366396848604523e-002, 1.0830156525255896e-001, 1.6570000000000001e-001;
-2.8990249638850329e-002, 7.2488303659308695e-002, 1.7780000000000001e-001;
-2.3603799101664436e-002, 7.5735091281379452e-002, 1.7579999999999998e-001;
-4.2733757910307091e-002, 7.1783638615472212e-002, 1.3589999999999999e-001;
-6.5834256612443909e-002, 5.7815346934783074e-002, 1.4230000000000001e-001;
-6.7076173517195414e-002, 5.0774215309779880e-002, 1.4510000000000001e-001;
-7.7493754839396800e-002, 5.6543508350202609e-002, 1.1010000000000000e-001;
-8.3437100867300273e-002, 4.3285023548542245e-002, 9.2899999999999996e-002;
-7.8140443582185526e-002, 3.4701884333945499e-002, 8.6500000000000007e-002;
-6.2904972370690260e-002, 2.9380728193572736e-002, 8.8000000000000009e-002;
-5.0575674226140066e-002, 4.1378527908603857e-002, 9.4600000000000004e-002;
-3.7530293571547801e-002, 2.9492818368749285e-002, 9.4299999999999995e-002;
-2.5480519753907416e-002, 5.0489471212566306e-002, 9.6900000000000000e-002;
-1.5811147128429681e-002, 3.6455602629870576e-002, 1.0560000000000000e-001;
-1.3623195024511148e-002, 3.3023322354348572e-002, 1.1390000000000000e-001;
-1.3078242370475834e-002, 2.3921358528453451e-002, 9.2699999999999991e-002;
-1.1665978412656486e-002, 4.6889910860992590e-002, 8.4800000000000000e-002;
-1.1057518477750605e-002, 2.1095767295774115e-002, 7.9199999999999993e-002;
-3.5500769385130582e-003, 1.9350259876930620e-002, 7.9000000000000001e-002;
-4.0091273397440119e-003, 2.4435086241793469e-002, 8.1000000000000003e-002;
-2.6706581505724358e-003, 2.0699597271832237e-002, 7.8299999999999995e-002;
-6.9080484514429941e-003, 1.9443895441419112e-002, 6.9199999999999998e-002;
-5.5474687375021148e-003, 2.5823472588566876e-002, 6.2100000000000002e-002;
-8.5975304020564636e-003, 2.8570642360117970e-002, 6.2699999999999992e-002;
-1.0035881703480243e-002, 3.1152336660817959e-002, 6.2199999999999998e-002;
-7.0303958060371485e-003, 2.1687265092285912e-002, 6.6500000000000004e-002;
-5.8350389745083220e-003, 3.0295425205495219e-002, 6.8400000000000002e-002;
3.7000011882959427e-003, 2.7397559342506872e-002, 6.9199999999999998e-002;
8.4384375816348722e-004, 3.3739380042497880e-002, 6.6600000000000006e-002;
5.7875193242438172e-003, 3.9850322530345039e-002, 7.1599999999999997e-002;
3.4826974951247536e-003, 4.7684800945334560e-002, 7.9800000000000010e-002;
9.0205001602736701e-003, 3.2309473053872662e-002, 8.4700000000000011e-002;
1.1602002723241966e-002, 4.2437558261487096e-002, 9.4399999999999998e-002;
1.0727253531554126e-002, 3.9442307350746830e-002, 9.7299999999999998e-002;
1.0478054167251116e-002, 2.9474511048905416e-002, 9.0800000000000006e-002;
5.7769411729271525e-003, 2.6619819505881992e-002, 8.6099999999999996e-002;
1.0146775956780374e-002, 4.9017285623800477e-002, 8.2500000000000004e-002;
5.6961778759188064e-003, 4.7444796184034521e-002, 8.2400000000000001e-002;
-1.1072568495222868e-003, 3.6239655982325480e-002, 8.1600000000000006e-002;
-1.5465707409310525e-002, 3.1366693341789098e-002, 7.7399999999999997e-002;
-2.7250024246535887e-002, 4.7905236749817171e-002, 6.4299999999999996e-002;
-2.7337568911169896e-002, 2.5679327033720556e-002, 5.8600000000000006e-002;
-2.8996765457870666e-002, 2.7744462882228538e-002, 5.6399999999999999e-002;
-3.0694988523064737e-002, 2.0348807487869491e-002, 4.8200000000000000e-002;
-2.6687542665930764e-002, 2.6838736648956640e-002, 4.0199999999999993e-002;
-2.3361909698373040e-002, 2.0963598977361553e-002, 3.7699999999999997e-002;
-1.9843866905633334e-002, 1.7512821090635011e-002, 3.2599999999999997e-002;
-1.5118603774070039e-002, 2.1185582236595835e-002, 3.0400000000000000e-002;
-2.0197613265910519e-002, 3.1946708550473213e-002, 3.0400000000000000e-002;
-2.1520678025641615e-002, 2.1834134877041667e-002, 2.9999999999999999e-002;
-2.2826650301176699e-002, 1.8033708065957166e-002, 3.0600000000000002e-002;
-1.5976648136103222e-002, 1.9600906791856332e-002, 2.9900000000000003e-002;
-1.2481565520511495e-002, 2.5764744780397253e-002, 3.2099999999999997e-002;
-6.2498609089072232e-003, 1.7163326403677015e-002, 3.9399999999999998e-002;
-7.5419440421207184e-003, 2.4448612633015232e-002, 4.4900000000000002e-002;
-2.9008641302628035e-003, 1.9270549031769058e-002, 5.1699999999999996e-002;
-7.2102329848391378e-003, 2.6468635791329520e-002, 5.8099999999999999e-002;
-1.2589423111688092e-002, 1.4805044409490042e-002, 6.0199999999999997e-002;
-1.1715387895728568e-002, 1.7085018789666284e-002, 5.7999999999999996e-002;
-1.1777024741238762e-002, 1.9780736678506994e-002, 5.7200000000000001e-002;
-1.2215155411272605e-002, 2.4726200999461767e-002, 5.3600000000000002e-002;
-3.5465932809213285e-003, 1.3486465713533846e-002, 5.2400000000000002e-002;
-2.9219038194341351e-003, 1.9323425037825803e-002, 5.3099999999999994e-002;
8.2672938771111149e-004, 1.6730936106534644e-002, 5.2800000000000000e-002;
5.2731183513543556e-004, 2.1687064498104203e-002, 5.2800000000000000e-002;
7.4708897268216390e-003, 1.3887651948481405e-002, 5.5199999999999999e-002;
1.1578449231922860e-002, 1.0535540622131023e-002, 5.5300000000000002e-002;
1.0543713785281739e-002, 1.3591721544186308e-002, 5.5099999999999996e-002;
1.3043222430857426e-002, 9.7155784328055717e-003, 5.5199999999999999e-002;
1.1021797245557963e-002, 7.8485022563632434e-003, 5.5000000000000000e-002;
1.3766304579396760e-002, 1.4031942678612408e-002, 5.5300000000000002e-002;
2.0010289782806723e-002, 1.1684049976040223e-002, 4.8600000000000004e-002;
1.9500810360241871e-002, 1.5486288460806463e-002, 4.7300000000000002e-002;
1.8677267947765586e-002, 1.7674602281525287e-002, 4.7500000000000001e-002;
2.1068187519647452e-002, 1.3207048148448308e-002, 5.0900000000000001e-002;
2.9432867931319606e-002, 1.8614186008366396e-002, 5.3099999999999994e-002;
2.2709401609937174e-002, 3.3601370511199269e-002, 5.6799999999999996e-002;
2.9063996825298588e-002, 1.9804593863093523e-002, 6.2699999999999992e-002;
1.8810297095397388e-002, 1.8609127901011213e-002, 6.5199999999999994e-002;
1.4978576794066001e-002, 1.7916238079900726e-002, 6.4699999999999994e-002;
4.8316137761403866e-003, 3.2976319868455617e-002, 5.5899999999999998e-002;
-9.1822274865016595e-004, 3.1213866380320532e-002, 4.3299999999999998e-002;
-1.3163778876048582e-002, 1.5733791887268644e-002, 3.5000000000000003e-002;
-1.7841900605217731e-002, 1.6933827369602694e-002, 2.1299999999999999e-002;
-1.9532762689722816e-002, 1.6823164543461777e-002, 1.7299999999999999e-002;
-2.2376267503108949e-002, 1.5189134545742444e-002, 1.7500000000000002e-002;
-2.4570058045892296e-002, 1.5598774847326746e-002, 1.7399999999999999e-002;
-3.1885812767447064e-002, 2.2380594713903079e-002, 1.4400000000000000e-002;
-3.5301487936340692e-002, 3.0770251840726015e-002, 1.2500000000000001e-002;
-3.3809664438850362e-002, 1.1207937615285157e-002, 1.2500000000000001e-002;
-2.3738888747095288e-002, 1.8271566479553414e-002, 1.0200000000000001e-002;
-2.2389486776477341e-002, 1.8759653895370487e-002, 1.0000000000000000e-002;
-1.9372963882339889e-002, 3.6183114349394030e-002, 1.0000000000000000e-002;
-1.8172640165300180e-002, 3.8524562683139418e-002, 1.0100000000000000e-002;
-1.5851276113677315e-002, 1.4577624436418635e-002, 1.4300000000000000e-002;
-1.5145664166732686e-002, 2.7339757365790307e-002, 1.9500000000000000e-002;
-1.3284941407389894e-002, 3.0828456732055809e-002, 2.4700000000000003e-002;
-1.2679438144379773e-002, 2.5660138484441486e-002, 2.9399999999999999e-002;
-1.0133886633141742e-002, 3.3074553498490200e-002, 3.4599999999999999e-002;
-1.5055016783550812e-002, 3.0184663811322121e-002, 3.9800000000000002e-002;
];
-9.3174834887745916e-003, 1.7994658843431877e-002, 2.5699999999999997e-002;
7.7668705855149511e-003, 6.0096276044880881e-003, 3.0800000000000001e-002;
-1.9541593158383108e-003, 1.1443694953360728e-002, 3.5799999999999998e-002;
-7.3230760374594084e-003, 1.6080663886388402e-002, 3.9900000000000005e-002;
5.7366104256297845e-003, 9.6254961625830138e-003, 3.9300000000000002e-002;
-8.3093609995312789e-003, 1.7721697565065142e-002, 3.7000000000000005e-002;
-1.5818734568909143e-002, 1.8802248364432783e-002, 2.9399999999999999e-002;
-3.8114188274117389e-002, 1.7753163941062411e-002, 2.3000000000000000e-002;
-4.1399862204639426e-002, 4.5389998028741996e-003, 2.0000000000000000e-002;
-3.2217707697825837e-002, 7.3753322217300354e-003, 1.7299999999999999e-002;
-2.5646357007195419e-002, 1.0583418386522991e-002, 1.6799999999999999e-002;
-1.4897222570872337e-002, 1.0366269881014523e-002, 2.4000000000000000e-002;
-6.6220480083236666e-003, 2.3042923285839567e-002, 2.4600000000000000e-002;
-5.3027079623060303e-003, 1.0468178907987236e-002, 2.6099999999999998e-002;
-5.7275387773225717e-003, 1.0815248301383029e-002, 2.8500000000000001e-002;
-1.2909019643277730e-002, 1.3963993831495269e-002, 2.9200000000000000e-002;
-9.6082193296807006e-003, 1.1306915202373702e-002, 2.9700000000000001e-002;
-6.9847294194245180e-003, 4.0554812275257479e-003, 2.9600000000000001e-002;
1.8176103434601742e-003, 7.3752799189321649e-003, 3.3300000000000003e-002;
-4.5038023245602687e-004, 2.3887283546807359e-002, 3.4500000000000003e-002;
1.1624668564948593e-002, 1.4307761419874110e-002, 3.4599999999999999e-002;
1.2948656776092804e-002, 1.3154713006571006e-002, 3.4900000000000000e-002;
1.6160285046599832e-002, 1.9531653948000383e-002, 3.4599999999999999e-002;
8.4081398395898788e-003, 1.8522230201726275e-002, 3.5799999999999998e-002;
2.2153370885423129e-002, 1.7709079726716315e-002, 3.9699999999999999e-002;
2.4844201757035833e-002, 1.7812125625833675e-002, 4.0800000000000003e-002;
3.4050690186470334e-002, 1.7733161216544779e-002, 4.0700000000000000e-002;
4.6893307071320223e-002, 2.4854086852623247e-002, 4.1700000000000001e-002;
5.9972460768834779e-002, 2.4879959563927745e-002, 4.5599999999999995e-002;
5.2289186415585220e-002, 3.7979469553559353e-002, 4.9100000000000005e-002;
4.7741188658148914e-002, 3.9049003040727781e-002, 5.4100000000000002e-002;
4.4667561574096126e-002, 3.5671179948047138e-002, 5.5599999999999997e-002;
4.2427836565945398e-002, 1.9374879269963063e-002, 4.8200000000000000e-002;
3.1462874033119093e-002, 2.5309792721300628e-002, 3.9900000000000005e-002;
2.8437659950142802e-002, 3.7210113920888466e-002, 3.8900000000000004e-002;
2.5156025048538311e-002, 4.4947363315081201e-002, 4.1700000000000001e-002;
3.4855619579102992e-002, 4.3766256282161686e-002, 4.7899999999999998e-002;
4.1146105898716812e-002, 4.5485089147871749e-002, 5.9800000000000006e-002;
3.7608522339491302e-002, 3.9312213398265738e-002, 5.9400000000000001e-002;
3.1755688168807694e-002, 5.7147340097736921e-002, 5.9200000000000003e-002;
3.7547536338742304e-002, 4.0820102882030529e-002, 6.5700000000000008e-002;
3.0780798807969134e-002, 5.4795099957268389e-002, 8.3299999999999999e-002;
2.7622883356809069e-002, 5.9674785474016057e-002, 8.9800000000000005e-002;
1.3687491471252144e-002, 5.1526594947709725e-002, 8.9399999999999993e-002;
3.0365204590552253e-003, 5.7110106004252703e-002, 8.5699999999999998e-002;
-3.8946120840908094e-003, 5.8310720503999880e-002, 7.8799999999999995e-002;
-3.7031729362304588e-003, 3.2162694194911579e-002, 6.7000000000000004e-002;
-2.2953853215847531e-002, 5.2193859691229916e-002, 5.5700000000000000e-002;
-3.9774834192911612e-003, 6.1343390594280400e-002, 3.8599999999999995e-002;
-6.6430088990969693e-003, 5.4548116487401987e-002, 4.5599999999999995e-002;
-6.9966828696923500e-003, 4.0591135320590110e-002, 5.4699999999999999e-002;
-1.2347397716578001e-002, 3.2276797966984239e-002, 4.7500000000000001e-002;
-2.9473495209533240e-003, 6.7805039825567626e-002, 3.5400000000000001e-002;
1.2120764500071601e-002, 2.3686434724627725e-002, 4.2999999999999997e-002;
1.3231348379735053e-002, 3.7187744116042420e-002, 4.7400000000000005e-002;
2.0987028138604202e-002, 4.7889363970077925e-002, 5.1399999999999994e-002;
3.7485754706574781e-002, 5.3965548807981989e-002, 6.5400000000000000e-002;
4.0318879693293397e-002, 6.8340638829176292e-002, 7.8200000000000006e-002;
2.6218511286559831e-002, 7.8958874043481897e-002, 1.0560000000000000e-001;
2.6929695576288992e-002, 7.0997794665009550e-002, 1.0000000000000001e-001;
9.4554586277908470e-003, 8.4242699131246379e-002, 9.3200000000000005e-002;
3.6174737897027853e-003, 9.1565984601668537e-002, 1.1250000000000000e-001;
-1.4685635040370570e-002, 1.2944791465588246e-001, 1.2089999999999999e-001;
-2.7095820218557165e-002, 1.2813135610460602e-001, 9.3500000000000000e-002;
-4.7490291499844517e-002, 9.5634229266530868e-002, 6.3000000000000000e-002;
-4.8493379593802288e-002, 6.0105697293320492e-002, 5.4199999999999998e-002;
-3.9943449805699416e-002, 7.6752303729665350e-002, 6.1600000000000002e-002;
-3.5077206071779443e-002, 7.2995258807648344e-002, 5.4100000000000002e-002;
-2.0906071356066036e-002, 4.5679585226099162e-002, 4.8300000000000003e-002;
-2.1531096410072337e-002, 4.3592360792875207e-002, 5.2000000000000005e-002;
-2.4735476775209264e-002, 5.5187881222506396e-002, 5.2800000000000000e-002;
-2.5561529099840996e-002, 7.0182306554444240e-002, 4.8700000000000000e-002;
-2.1575901985043444e-002, 6.8358747781264828e-002, 4.6600000000000003e-002;
-1.0282812897440152e-002, 6.5803889922906311e-002, 5.1600000000000000e-002;
-9.1324207260257140e-004, 5.6172786341162295e-002, 5.8200000000000002e-002;
-9.5486836624303351e-003, 6.9205174325260410e-002, 6.5099999999999991e-002;
-1.4957543819619445e-002, 6.8508819756844419e-002, 6.7599999999999993e-002;
1.5069561708809687e-002, 7.9300571687745292e-002, 7.2800000000000004e-002;
1.6283475252537372e-002, 7.0872150059167804e-002, 8.1000000000000003e-002;
2.0908466837013862e-002, 8.4120663761548808e-002, 9.5799999999999996e-002;
1.4559374240283418e-002, 7.4654989747748868e-002, 1.0070000000000000e-001;
7.4026792768986382e-003, 1.0065048845414548e-001, 1.0180000000000000e-001;
6.7867658044900026e-003, 8.4869122045493794e-002, 1.0949999999999999e-001;
2.0964569874966088e-003, 8.1073829867721159e-002, 1.3580000000000000e-001;
-2.1618734445638665e-003, 9.0701460926355892e-002, 1.5049999999999999e-001;
-2.9866760868227260e-002, 9.1306883112545645e-002, 1.2689999999999999e-001;
-3.8807200394211705e-002, 9.3833166941218682e-002, 9.8400000000000001e-002;
-2.7491967650325577e-002, 1.1718934484063248e-001, 1.5850000000000000e-001;
-1.4366396848604523e-002, 1.0830156525255896e-001, 1.6570000000000001e-001;
-2.8990249638850329e-002, 7.2488303659308695e-002, 1.7780000000000001e-001;
-2.3603799101664436e-002, 7.5735091281379452e-002, 1.7579999999999998e-001;
-4.2733757910307091e-002, 7.1783638615472212e-002, 1.3589999999999999e-001;
-6.5834256612443909e-002, 5.7815346934783074e-002, 1.4230000000000001e-001;
-6.7076173517195414e-002, 5.0774215309779880e-002, 1.4510000000000001e-001;
-7.7493754839396800e-002, 5.6543508350202609e-002, 1.1010000000000000e-001;
-8.3437100867300273e-002, 4.3285023548542245e-002, 9.2899999999999996e-002;
-7.8140443582185526e-002, 3.4701884333945499e-002, 8.6500000000000007e-002;
-6.2904972370690260e-002, 2.9380728193572736e-002, 8.8000000000000009e-002;
-5.0575674226140066e-002, 4.1378527908603857e-002, 9.4600000000000004e-002;
-3.7530293571547801e-002, 2.9492818368749285e-002, 9.4299999999999995e-002;
-2.5480519753907416e-002, 5.0489471212566306e-002, 9.6900000000000000e-002;
-1.5811147128429681e-002, 3.6455602629870576e-002, 1.0560000000000000e-001;
-1.3623195024511148e-002, 3.3023322354348572e-002, 1.1390000000000000e-001;
-1.3078242370475834e-002, 2.3921358528453451e-002, 9.2699999999999991e-002;
-1.1665978412656486e-002, 4.6889910860992590e-002, 8.4800000000000000e-002;
-1.1057518477750605e-002, 2.1095767295774115e-002, 7.9199999999999993e-002;
-3.5500769385130582e-003, 1.9350259876930620e-002, 7.9000000000000001e-002;
-4.0091273397440119e-003, 2.4435086241793469e-002, 8.1000000000000003e-002;
-2.6706581505724358e-003, 2.0699597271832237e-002, 7.8299999999999995e-002;
-6.9080484514429941e-003, 1.9443895441419112e-002, 6.9199999999999998e-002;
-5.5474687375021148e-003, 2.5823472588566876e-002, 6.2100000000000002e-002;
-8.5975304020564636e-003, 2.8570642360117970e-002, 6.2699999999999992e-002;
-1.0035881703480243e-002, 3.1152336660817959e-002, 6.2199999999999998e-002;
-7.0303958060371485e-003, 2.1687265092285912e-002, 6.6500000000000004e-002;
-5.8350389745083220e-003, 3.0295425205495219e-002, 6.8400000000000002e-002;
3.7000011882959427e-003, 2.7397559342506872e-002, 6.9199999999999998e-002;
8.4384375816348722e-004, 3.3739380042497880e-002, 6.6600000000000006e-002;
5.7875193242438172e-003, 3.9850322530345039e-002, 7.1599999999999997e-002;
3.4826974951247536e-003, 4.7684800945334560e-002, 7.9800000000000010e-002;
9.0205001602736701e-003, 3.2309473053872662e-002, 8.4700000000000011e-002;
1.1602002723241966e-002, 4.2437558261487096e-002, 9.4399999999999998e-002;
1.0727253531554126e-002, 3.9442307350746830e-002, 9.7299999999999998e-002;
1.0478054167251116e-002, 2.9474511048905416e-002, 9.0800000000000006e-002;
5.7769411729271525e-003, 2.6619819505881992e-002, 8.6099999999999996e-002;
1.0146775956780374e-002, 4.9017285623800477e-002, 8.2500000000000004e-002;
5.6961778759188064e-003, 4.7444796184034521e-002, 8.2400000000000001e-002;
-1.1072568495222868e-003, 3.6239655982325480e-002, 8.1600000000000006e-002;
-1.5465707409310525e-002, 3.1366693341789098e-002, 7.7399999999999997e-002;
-2.7250024246535887e-002, 4.7905236749817171e-002, 6.4299999999999996e-002;
-2.7337568911169896e-002, 2.5679327033720556e-002, 5.8600000000000006e-002;
-2.8996765457870666e-002, 2.7744462882228538e-002, 5.6399999999999999e-002;
-3.0694988523064737e-002, 2.0348807487869491e-002, 4.8200000000000000e-002;
-2.6687542665930764e-002, 2.6838736648956640e-002, 4.0199999999999993e-002;
-2.3361909698373040e-002, 2.0963598977361553e-002, 3.7699999999999997e-002;
-1.9843866905633334e-002, 1.7512821090635011e-002, 3.2599999999999997e-002;
-1.5118603774070039e-002, 2.1185582236595835e-002, 3.0400000000000000e-002;
-2.0197613265910519e-002, 3.1946708550473213e-002, 3.0400000000000000e-002;
-2.1520678025641615e-002, 2.1834134877041667e-002, 2.9999999999999999e-002;
-2.2826650301176699e-002, 1.8033708065957166e-002, 3.0600000000000002e-002;
-1.5976648136103222e-002, 1.9600906791856332e-002, 2.9900000000000003e-002;
-1.2481565520511495e-002, 2.5764744780397253e-002, 3.2099999999999997e-002;
-6.2498609089072232e-003, 1.7163326403677015e-002, 3.9399999999999998e-002;
-7.5419440421207184e-003, 2.4448612633015232e-002, 4.4900000000000002e-002;
-2.9008641302628035e-003, 1.9270549031769058e-002, 5.1699999999999996e-002;
-7.2102329848391378e-003, 2.6468635791329520e-002, 5.8099999999999999e-002;
-1.2589423111688092e-002, 1.4805044409490042e-002, 6.0199999999999997e-002;
-1.1715387895728568e-002, 1.7085018789666284e-002, 5.7999999999999996e-002;
-1.1777024741238762e-002, 1.9780736678506994e-002, 5.7200000000000001e-002;
-1.2215155411272605e-002, 2.4726200999461767e-002, 5.3600000000000002e-002;
-3.5465932809213285e-003, 1.3486465713533846e-002, 5.2400000000000002e-002;
-2.9219038194341351e-003, 1.9323425037825803e-002, 5.3099999999999994e-002;
8.2672938771111149e-004, 1.6730936106534644e-002, 5.2800000000000000e-002;
5.2731183513543556e-004, 2.1687064498104203e-002, 5.2800000000000000e-002;
7.4708897268216390e-003, 1.3887651948481405e-002, 5.5199999999999999e-002;
1.1578449231922860e-002, 1.0535540622131023e-002, 5.5300000000000002e-002;
1.0543713785281739e-002, 1.3591721544186308e-002, 5.5099999999999996e-002;
1.3043222430857426e-002, 9.7155784328055717e-003, 5.5199999999999999e-002;
1.1021797245557963e-002, 7.8485022563632434e-003, 5.5000000000000000e-002;
1.3766304579396760e-002, 1.4031942678612408e-002, 5.5300000000000002e-002;
2.0010289782806723e-002, 1.1684049976040223e-002, 4.8600000000000004e-002;
1.9500810360241871e-002, 1.5486288460806463e-002, 4.7300000000000002e-002;
1.8677267947765586e-002, 1.7674602281525287e-002, 4.7500000000000001e-002;
2.1068187519647452e-002, 1.3207048148448308e-002, 5.0900000000000001e-002;
2.9432867931319606e-002, 1.8614186008366396e-002, 5.3099999999999994e-002;
2.2709401609937174e-002, 3.3601370511199269e-002, 5.6799999999999996e-002;
2.9063996825298588e-002, 1.9804593863093523e-002, 6.2699999999999992e-002;
1.8810297095397388e-002, 1.8609127901011213e-002, 6.5199999999999994e-002;
1.4978576794066001e-002, 1.7916238079900726e-002, 6.4699999999999994e-002;
4.8316137761403866e-003, 3.2976319868455617e-002, 5.5899999999999998e-002;
-9.1822274865016595e-004, 3.1213866380320532e-002, 4.3299999999999998e-002;
-1.3163778876048582e-002, 1.5733791887268644e-002, 3.5000000000000003e-002;
-1.7841900605217731e-002, 1.6933827369602694e-002, 2.1299999999999999e-002;
-1.9532762689722816e-002, 1.6823164543461777e-002, 1.7299999999999999e-002;
-2.2376267503108949e-002, 1.5189134545742444e-002, 1.7500000000000002e-002;
-2.4570058045892296e-002, 1.5598774847326746e-002, 1.7399999999999999e-002;
-3.1885812767447064e-002, 2.2380594713903079e-002, 1.4400000000000000e-002;
-3.5301487936340692e-002, 3.0770251840726015e-002, 1.2500000000000001e-002;
-3.3809664438850362e-002, 1.1207937615285157e-002, 1.2500000000000001e-002;
-2.3738888747095288e-002, 1.8271566479553414e-002, 1.0200000000000001e-002;
-2.2389486776477341e-002, 1.8759653895370487e-002, 1.0000000000000000e-002;
-1.9372963882339889e-002, 3.6183114349394030e-002, 1.0000000000000000e-002;
-1.8172640165300180e-002, 3.8524562683139418e-002, 1.0100000000000000e-002;
-1.5851276113677315e-002, 1.4577624436418635e-002, 1.4300000000000000e-002;
-1.5145664166732686e-002, 2.7339757365790307e-002, 1.9500000000000000e-002;
-1.3284941407389894e-002, 3.0828456732055809e-002, 2.4700000000000003e-002;
-1.2679438144379773e-002, 2.5660138484441486e-002, 2.9399999999999999e-002;
-1.0133886633141742e-002, 3.3074553498490200e-002, 3.4599999999999999e-002;
-1.5055016783550812e-002, 3.0184663811322121e-002, 3.9800000000000002e-002;
];
Y = sbvar_data(:, 1);
Pie = sbvar_data(:, 2);

View File

@ -1,98 +1,98 @@
data = [0.928467646476 11.8716889412 20 0.418037507392 0.227382377518 ...
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
data = reshape(data,5,86)';
y_obs = data(:,1);
pie_obs = data(:,2);
R_obs = data(:,3);
de = data(:,4);
dq = data(:,5);
%Country: Canada
%Sample Range: 1981:2 to 2002:3
%Observations: 86

View File

@ -1,153 +1,153 @@
series = [ 1.760105924130475 0.312845989288584 0.472239512216113
1.791115550250920 0.315305579629763 0.495435385609039
1.751331053949751 0.311989642569820 0.464766630177063
1.765929133664154 0.313176251276488 0.475784761647821
1.770872676560947 0.313535941672459 0.479277718740513
1.748075630214838 0.311640694207934 0.461812669855265
1.740886476370027 0.311073006485788 0.456517504298258
1.746988485610710 0.311609842604230 0.461340624803336
1.808281456868951 0.316539782119637 0.507629282479002
1.854947854385870 0.320010198263909 0.541895324334327
1.827811476526137 0.317608694730638 0.519624032701902
1.879047068282612 0.321359760057394 0.557145907254063
1.887936238720303 0.321683176283716 0.561813543154462
1.882365288701271 0.320907888275609 0.555461197000685
1.890963491380599 0.321242988024427 0.560026873563179
1.882743098340623 0.320289640711274 0.551797310779183
1.876245428003903 0.319508363989648 0.545106040180286
1.899034955459843 0.320980198691605 0.560776758509276
1.919897524223688 0.322227856348739 0.574674345449269
1.940465687586868 0.323391885583672 0.588076473486549
1.946743468303839 0.323448346524082 0.590378789190440
1.918157772981919 0.320928920092838 0.566236466080824
1.925845147314101 0.321216558537531 0.570201396175100
1.950276054315104 0.322717541652949 0.586824950361549
1.952915927458601 0.322540993947346 0.586583808819511
1.965636934883926 0.323122493559917 0.594038815545898
1.972278860444277 0.323231527516691 0.596759621388749
1.959399309100668 0.321916338391799 0.584645544633759
1.958073327908836 0.321508830194106 0.581624183440973
1.936706642470067 0.319634602213589 0.563522208941135
1.947132164851317 0.320188564417158 0.569981980824923
1.919592010791757 0.317893953785440 0.547555649660018
1.894582145436749 0.315863589696844 0.527608826086009
1.875328652440384 0.314322533775785 0.512518217710308
1.818937674207909 0.309930593995679 0.469772963605365
1.842409309222495 0.311897436693824 0.488301677052811
1.845447947284471 0.312192107041639 0.490975676211932
1.829190530052879 0.310975037205003 0.479016383910071
1.851212468593380 0.312780063456632 0.496217792811673
1.817833267055856 0.310203236444623 0.471201641902107
1.814097651048634 0.310028641358866 0.469129333784112
1.808063752653222 0.309676136030093 0.465359164080259
1.812053865835763 0.310126209868808 0.469216929060463
1.815799385165197 0.310539545366918 0.472785315494855
1.798798028758880 0.309298628496020 0.460618548651907
1.796971476500592 0.309299647541166 0.460158134508980
1.792859811632106 0.309117520299899 0.457969407540741
1.802670357795570 0.310047046957601 0.466302337158534
1.820354449456020 0.311558370446942 0.480365151317462
1.837863518950930 0.312988951978216 0.493967328821185
1.819974600115587 0.311600489058620 0.480537413839488
1.819271706701453 0.311606389118186 0.480384082633725
1.796029494102046 0.309829708408597 0.463237300920444
1.775524357691159 0.308313824436222 0.448559541114655
1.774854815875979 0.308434688960723 0.449144066862645
1.800835802767033 0.310677704459576 0.469765050688536
1.786059157721867 0.309590821826591 0.459188017661675
1.791551405000660 0.310156043725194 0.464114176691556
1.786523594020741 0.309861195621005 0.460986828042084
1.804952143362207 0.311441919821646 0.475591467341628
1.784480090431664 0.309872669759674 0.460532950060849
1.784140477821738 0.309959999276874 0.460985722206660
1.792798863056227 0.310761222426831 0.468191678518626
1.810747873450371 0.312264562058321 0.482223441024178
1.836065173354547 0.314274983408592 0.501492175433812
1.834938445492660 0.314139706316670 0.500357204123308
1.806164052494138 0.311841299442154 0.478396307371778
1.791620538153089 0.310730861290031 0.467698336394830
1.772173414017760 0.309256295298234 0.453561242440342
1.812359648762609 0.312589557817234 0.484663233994422
1.799780206306195 0.311608460056369 0.475265269172501
1.811364242815336 0.312573632439023 0.484300778401714
1.806180627845691 0.312178076723633 0.480478570801151
1.820046807592720 0.313298422774191 0.491109285086001
1.804568707455205 0.312065809617281 0.479359179539144
1.778702229794904 0.310038401087946 0.460068807524478
1.753649470369830 0.308120981940320 0.441860777634412
1.762068124424802 0.308974588046040 0.449247521833160
1.758856007155504 0.308854726469356 0.447693105953493
1.755433459009933 0.308720641041879 0.446000172507877
1.779715943854885 0.310825716005938 0.465178127643472
1.783930656673236 0.311234452750944 0.468790547227773
1.786393861473134 0.311487455757189 0.470991209360008
1.812898088968145 0.313635733468485 0.491256411174780
1.797000942820567 0.312346799207385 0.479078496049043
1.807708490475648 0.313210619724172 0.487246468090725
1.820545018487566 0.314204773496048 0.496832484203625
1.814116326762029 0.313647239601944 0.491664078190780
1.815926310618496 0.313758727958057 0.492837457825446
1.793643825095235 0.311961730422198 0.475822245177027
1.772611874266904 0.310310656389495 0.460168156652974
1.773842053215969 0.310499043015798 0.461642812402857
1.785642136192052 0.311526453631286 0.471032222071789
1.829627605677892 0.315044478550508 0.504474308367718
1.815474499865232 0.313850063604634 0.493282068447158
1.816739274169429 0.313910944956201 0.493994123075643
1.813254431983305 0.313595577041968 0.491112183202942
1.777865207201645 0.310754679633359 0.464261094025897
1.769595829699111 0.310163842241233 0.458485858065570
1.738659830875185 0.307745681157472 0.435795806472776
1.753436721676202 0.309129771430515 0.447999836470890
1.738481436021817 0.308039101942578 0.437545017347768
1.740721029687560 0.308389115201939 0.440245658063711
1.732029327854716 0.307829919218540 0.434648762458203
1.737881122071139 0.308481963044799 0.440093163154560
1.728349104083563 0.307847119795516 0.433830656073788
1.737427954717117 0.308761979466418 0.441680792447009
1.750442947374700 0.309959966873872 0.452290462457059
1.779708864329036 0.312413921952660 0.474876889887843
1.775517700307935 0.312080924290991 0.471738746822015
1.738514480440751 0.309096953236020 0.443991465279803
1.724939674799569 0.308103998655976 0.434532905394758
1.748639894643620 0.310202459511950 0.453294130844291
1.730755612953242 0.308820365538791 0.440340001996458
1.747650308897352 0.310332409785786 0.453823831757850
1.749916699862329 0.310591600424986 0.455980263561499
1.774426772869005 0.312637115042041 0.474818879600935
1.740468164509070 0.309876282879142 0.449208911368321
1.737549008596557 0.309727704615865 0.447559410722363
1.717860431453982 0.308201819817147 0.433340786017471
1.767957927064596 0.312440621914469 0.471904911234585
1.781541660272785 0.313526179152300 0.482105532880402
1.804344557934195 0.315294209577413 0.499025051607507
1.784390243718790 0.313599070228016 0.483320723495016
1.775311536722649 0.312826632807963 0.476202483262179
1.769910016585468 0.312375180855473 0.472029256009528
1.788150491156262 0.313835100220238 0.485763549426003
1.782208569646677 0.313306245996605 0.480957924899580
1.793299392486021 0.314155939009175 0.489106667914307
1.756885968603183 0.311168062389533 0.461287567602054
1.750759539703974 0.310714859720743 0.456944873825189
1.736951131154746 0.309648094136421 0.446925313549972
1.711160587304450 0.307618648711839 0.428144813997209
1.720963686450892 0.308600975424972 0.436526291240511
1.726695519089401 0.309207201827563 0.441636496567855
1.728089508420109 0.309432993463704 0.443352306847972
1.706713941073114 0.307765747865817 0.427915961562161
1.726924471697119 0.309600667916548 0.444058294820935
1.733588015863146 0.310242486127838 0.449633093256537
1.729174707935853 0.309950688669380 0.446740897858215
1.730286135569681 0.310122869634148 0.448060312437253
1.726601265171260 0.309893747429677 0.445735020251979
1.698421870820049 0.307636786323920 0.425068312709748
1.695448780500048 0.307550916364643 0.423804837967207
1.683650854279764 0.306723382060783 0.415936535399100
1.669913985903250 0.305753527158022 0.406787487941312
1.653878134082938 0.304611079255971 0.396118930676138
1.648446560982758 0.304410745365111 0.393617956062407
1.619912950387850 0.302205289654123 0.373881240161860
1.639388896456292 0.304249793143430 0.390462851630105] ;
1.791115550250920 0.315305579629763 0.495435385609039
1.751331053949751 0.311989642569820 0.464766630177063
1.765929133664154 0.313176251276488 0.475784761647821
1.770872676560947 0.313535941672459 0.479277718740513
1.748075630214838 0.311640694207934 0.461812669855265
1.740886476370027 0.311073006485788 0.456517504298258
1.746988485610710 0.311609842604230 0.461340624803336
1.808281456868951 0.316539782119637 0.507629282479002
1.854947854385870 0.320010198263909 0.541895324334327
1.827811476526137 0.317608694730638 0.519624032701902
1.879047068282612 0.321359760057394 0.557145907254063
1.887936238720303 0.321683176283716 0.561813543154462
1.882365288701271 0.320907888275609 0.555461197000685
1.890963491380599 0.321242988024427 0.560026873563179
1.882743098340623 0.320289640711274 0.551797310779183
1.876245428003903 0.319508363989648 0.545106040180286
1.899034955459843 0.320980198691605 0.560776758509276
1.919897524223688 0.322227856348739 0.574674345449269
1.940465687586868 0.323391885583672 0.588076473486549
1.946743468303839 0.323448346524082 0.590378789190440
1.918157772981919 0.320928920092838 0.566236466080824
1.925845147314101 0.321216558537531 0.570201396175100
1.950276054315104 0.322717541652949 0.586824950361549
1.952915927458601 0.322540993947346 0.586583808819511
1.965636934883926 0.323122493559917 0.594038815545898
1.972278860444277 0.323231527516691 0.596759621388749
1.959399309100668 0.321916338391799 0.584645544633759
1.958073327908836 0.321508830194106 0.581624183440973
1.936706642470067 0.319634602213589 0.563522208941135
1.947132164851317 0.320188564417158 0.569981980824923
1.919592010791757 0.317893953785440 0.547555649660018
1.894582145436749 0.315863589696844 0.527608826086009
1.875328652440384 0.314322533775785 0.512518217710308
1.818937674207909 0.309930593995679 0.469772963605365
1.842409309222495 0.311897436693824 0.488301677052811
1.845447947284471 0.312192107041639 0.490975676211932
1.829190530052879 0.310975037205003 0.479016383910071
1.851212468593380 0.312780063456632 0.496217792811673
1.817833267055856 0.310203236444623 0.471201641902107
1.814097651048634 0.310028641358866 0.469129333784112
1.808063752653222 0.309676136030093 0.465359164080259
1.812053865835763 0.310126209868808 0.469216929060463
1.815799385165197 0.310539545366918 0.472785315494855
1.798798028758880 0.309298628496020 0.460618548651907
1.796971476500592 0.309299647541166 0.460158134508980
1.792859811632106 0.309117520299899 0.457969407540741
1.802670357795570 0.310047046957601 0.466302337158534
1.820354449456020 0.311558370446942 0.480365151317462
1.837863518950930 0.312988951978216 0.493967328821185
1.819974600115587 0.311600489058620 0.480537413839488
1.819271706701453 0.311606389118186 0.480384082633725
1.796029494102046 0.309829708408597 0.463237300920444
1.775524357691159 0.308313824436222 0.448559541114655
1.774854815875979 0.308434688960723 0.449144066862645
1.800835802767033 0.310677704459576 0.469765050688536
1.786059157721867 0.309590821826591 0.459188017661675
1.791551405000660 0.310156043725194 0.464114176691556
1.786523594020741 0.309861195621005 0.460986828042084
1.804952143362207 0.311441919821646 0.475591467341628
1.784480090431664 0.309872669759674 0.460532950060849
1.784140477821738 0.309959999276874 0.460985722206660
1.792798863056227 0.310761222426831 0.468191678518626
1.810747873450371 0.312264562058321 0.482223441024178
1.836065173354547 0.314274983408592 0.501492175433812
1.834938445492660 0.314139706316670 0.500357204123308
1.806164052494138 0.311841299442154 0.478396307371778
1.791620538153089 0.310730861290031 0.467698336394830
1.772173414017760 0.309256295298234 0.453561242440342
1.812359648762609 0.312589557817234 0.484663233994422
1.799780206306195 0.311608460056369 0.475265269172501
1.811364242815336 0.312573632439023 0.484300778401714
1.806180627845691 0.312178076723633 0.480478570801151
1.820046807592720 0.313298422774191 0.491109285086001
1.804568707455205 0.312065809617281 0.479359179539144
1.778702229794904 0.310038401087946 0.460068807524478
1.753649470369830 0.308120981940320 0.441860777634412
1.762068124424802 0.308974588046040 0.449247521833160
1.758856007155504 0.308854726469356 0.447693105953493
1.755433459009933 0.308720641041879 0.446000172507877
1.779715943854885 0.310825716005938 0.465178127643472
1.783930656673236 0.311234452750944 0.468790547227773
1.786393861473134 0.311487455757189 0.470991209360008
1.812898088968145 0.313635733468485 0.491256411174780
1.797000942820567 0.312346799207385 0.479078496049043
1.807708490475648 0.313210619724172 0.487246468090725
1.820545018487566 0.314204773496048 0.496832484203625
1.814116326762029 0.313647239601944 0.491664078190780
1.815926310618496 0.313758727958057 0.492837457825446
1.793643825095235 0.311961730422198 0.475822245177027
1.772611874266904 0.310310656389495 0.460168156652974
1.773842053215969 0.310499043015798 0.461642812402857
1.785642136192052 0.311526453631286 0.471032222071789
1.829627605677892 0.315044478550508 0.504474308367718
1.815474499865232 0.313850063604634 0.493282068447158
1.816739274169429 0.313910944956201 0.493994123075643
1.813254431983305 0.313595577041968 0.491112183202942
1.777865207201645 0.310754679633359 0.464261094025897
1.769595829699111 0.310163842241233 0.458485858065570
1.738659830875185 0.307745681157472 0.435795806472776
1.753436721676202 0.309129771430515 0.447999836470890
1.738481436021817 0.308039101942578 0.437545017347768
1.740721029687560 0.308389115201939 0.440245658063711
1.732029327854716 0.307829919218540 0.434648762458203
1.737881122071139 0.308481963044799 0.440093163154560
1.728349104083563 0.307847119795516 0.433830656073788
1.737427954717117 0.308761979466418 0.441680792447009
1.750442947374700 0.309959966873872 0.452290462457059
1.779708864329036 0.312413921952660 0.474876889887843
1.775517700307935 0.312080924290991 0.471738746822015
1.738514480440751 0.309096953236020 0.443991465279803
1.724939674799569 0.308103998655976 0.434532905394758
1.748639894643620 0.310202459511950 0.453294130844291
1.730755612953242 0.308820365538791 0.440340001996458
1.747650308897352 0.310332409785786 0.453823831757850
1.749916699862329 0.310591600424986 0.455980263561499
1.774426772869005 0.312637115042041 0.474818879600935
1.740468164509070 0.309876282879142 0.449208911368321
1.737549008596557 0.309727704615865 0.447559410722363
1.717860431453982 0.308201819817147 0.433340786017471
1.767957927064596 0.312440621914469 0.471904911234585
1.781541660272785 0.313526179152300 0.482105532880402
1.804344557934195 0.315294209577413 0.499025051607507
1.784390243718790 0.313599070228016 0.483320723495016
1.775311536722649 0.312826632807963 0.476202483262179
1.769910016585468 0.312375180855473 0.472029256009528
1.788150491156262 0.313835100220238 0.485763549426003
1.782208569646677 0.313306245996605 0.480957924899580
1.793299392486021 0.314155939009175 0.489106667914307
1.756885968603183 0.311168062389533 0.461287567602054
1.750759539703974 0.310714859720743 0.456944873825189
1.736951131154746 0.309648094136421 0.446925313549972
1.711160587304450 0.307618648711839 0.428144813997209
1.720963686450892 0.308600975424972 0.436526291240511
1.726695519089401 0.309207201827563 0.441636496567855
1.728089508420109 0.309432993463704 0.443352306847972
1.706713941073114 0.307765747865817 0.427915961562161
1.726924471697119 0.309600667916548 0.444058294820935
1.733588015863146 0.310242486127838 0.449633093256537
1.729174707935853 0.309950688669380 0.446740897858215
1.730286135569681 0.310122869634148 0.448060312437253
1.726601265171260 0.309893747429677 0.445735020251979
1.698421870820049 0.307636786323920 0.425068312709748
1.695448780500048 0.307550916364643 0.423804837967207
1.683650854279764 0.306723382060783 0.415936535399100
1.669913985903250 0.305753527158022 0.406787487941312
1.653878134082938 0.304611079255971 0.396118930676138
1.648446560982758 0.304410745365111 0.393617956062407
1.619912950387850 0.302205289654123 0.373881240161860
1.639388896456292 0.304249793143430 0.390462851630105] ;
set_dynare_seed('default');

View File

@ -1,153 +1,153 @@
series = [ 1.831805242058402 0.326183687045750 0.571394980772413
1.984702489138465 0.335169748463059 0.670420465974991
1.797086108881765 0.323738578123985 0.547308667595199
1.868444017934854 0.328080679826740 0.593052853366243
1.895360226929111 0.329595817929623 0.609928225756056
1.790832321540929 0.323045792420179 0.541464341531705
1.760361113136238 0.321043326280900 0.521508650424371
1.790915969739093 0.322955490721488 0.540943037175086
2.094179862755653 0.340746414276014 0.739070344706716
2.351323603033167 0.353813072593956 0.910247160484619
2.210203726655083 0.345882571920415 0.814539583358436
2.502764243167320 0.360529072208579 1.010034424820335
2.569208789183717 0.362428841518866 1.055534562597981
2.547595154425792 0.360952177511515 1.039047992042150
2.609146531246866 0.363696577503416 1.078846711754488
2.571616001378042 0.361498291257734 1.051509986784717
2.541891024016321 0.360071155104088 1.028624099377237
2.689409275114334 0.366815600832908 1.128105032869184
2.836542116534716 0.372524050373151 1.229814150394072
2.989371778822207 0.378100564290163 1.336372695875410
3.053527484610819 0.379663367671839 1.381646099750626
2.881583926807516 0.371937515643922 1.259734111646857
2.937243454748999 0.375283171360020 1.293755438734926
3.118203726771490 0.382439157449350 1.420284000580079
3.162221425436911 0.382978730072962 1.452879778911405
3.270131116244304 0.387045130060735 1.528307700189284
3.342461488854179 0.389086673292955 1.580437828600709
3.273192452854725 0.385774052536333 1.531120751032252
3.275458381986319 0.386357608290016 1.529824198671000
3.140839718197673 0.380646875429989 1.433095635793685
3.219561570532605 0.384603663097986 1.485897119680615
3.046020484023621 0.376619364484571 1.363233558132235
2.875797146770958 0.369735139885355 1.238996996305890
2.749622178822991 0.364254301976450 1.147444649402347
2.392412920492719 0.346784183865998 0.894670846513585
2.538569352588205 0.354489172654320 0.995609156305664
2.568582116289918 0.355797653561804 1.017051641895211
2.473671797066097 0.350928176810026 0.950257635346841
2.620458952999331 0.358256344008751 1.053181588833955
2.417877040613256 0.347870025062447 0.911027320823617
2.397670314991495 0.346921694035742 0.896082963087687
2.366883065577286 0.345289845529682 0.874408874120826
2.398421161488027 0.346918229004658 0.896452534897949
2.429022432917506 0.348458911692765 0.917940360480214
2.329480001673114 0.343218039531235 0.848090572728616
2.323778203248307 0.342928605968239 0.843955176095121
2.304540951504139 0.341899250525543 0.830468123386457
2.371683909087846 0.345441636785679 0.877514351279621
2.490195690751581 0.351506590301081 0.960838542863225
2.611493982190879 0.357442690934199 1.046618170917642
2.503405760920729 0.351887256856341 0.970703524500816
2.502374477458479 0.351865505580769 0.969514474424414
2.359478710434038 0.344470328092121 0.868876338341471
2.235614401552562 0.337896673011709 0.781763976906244
2.237065512060965 0.337998138421979 0.782823153982811
2.405249293222310 0.346934628008361 0.900834255435682
2.317208444296528 0.342286974469216 0.839012239040374
2.356353796613430 0.344364397044866 0.866418340883992
2.329623188746103 0.342942028228397 0.847657055734664
2.451699791573160 0.349287377428137 0.933477131054643
2.326653326931049 0.342720642543720 0.845654324922242
2.328176409623511 0.342824741941796 0.846575965562970
2.387605984815603 0.345939128892875 0.888332186956944
2.508162718702005 0.352082240173918 0.973304394397491
2.682098704221850 0.360548632109151 1.096619975241019
2.683210187517440 0.360334208336806 1.098196347992521
2.495448180812561 0.351002978084749 0.965191387615425
2.400677321318541 0.346260011274923 0.897566056014340
2.279709427240636 0.339905112366486 0.812280162193439
2.543742139352676 0.353571759314430 0.998416614177836
2.466804544683231 0.349570487450388 0.944374705292784
2.545923232397798 0.353562161906674 1.000133847612044
2.516609766492527 0.351998960811952 0.979615171231177
2.612598123816773 0.356735709969249 1.047580818676070
2.514581877733644 0.351736314350723 0.978472497403178
2.346814819442599 0.343151537387364 0.859593502999736
2.190061053436186 0.334783668048696 0.749123665788591
2.248248190346710 0.337975537211722 0.790133451151325
2.231245577955952 0.337099249591117 0.778120306643938
2.213620813638347 0.336172963701584 0.765787919679999
2.372368622485876 0.344669139219734 0.877475808694303
2.402394532412963 0.346236714114806 0.898578702308663
2.421632200543405 0.347211723112796 0.912182166100545
2.600814823475984 0.356206951763316 1.039020125139189
2.499717430182296 0.351010191098421 0.967897548419094
2.572211042595633 0.354659119526649 1.018967108776286
2.663557373274198 0.359030754462987 1.084127294941044
2.624508384540186 0.356972637699486 1.056848324055082
2.638578391882532 0.357631581496546 1.066764536958948
2.490619544707827 0.350219619250241 0.961836430307891
2.351499685312523 0.343126531712676 0.862944429125821
2.361744409273265 0.343693557597678 0.870045243822348
2.442494968080141 0.347873202461086 0.927160968018594
2.745123805313629 0.362770643020118 1.142349343426111
2.655499503705102 0.358132929197389 1.079779897215503
2.663850696079126 0.358574973979539 1.085379958290025
2.642540272757401 0.357462408799286 1.070401889504760
2.404037994048185 0.345491588561572 0.900884395443159
2.348769349405146 0.342712258600463 0.861219163642359
2.151645849089095 0.332135094769575 0.722080451054128
2.252343203542463 0.337640454116440 0.793256172150181
2.158313350236808 0.332590653949928 0.726803768436609
2.177375300770910 0.333675009914873 0.740364253592691
2.125333870619463 0.330857624626525 0.703750112206580
2.166601866570710 0.333192210611845 0.732859178568121
2.108843923653465 0.330052027456209 0.692243810014626
2.170141182101418 0.333505871231270 0.735409067431057
2.254451075620278 0.338167643418567 0.794516594921980
2.446506792318999 0.348291161505242 0.929849297341202
2.420231514001146 0.346916032088861 0.911318264635804
2.181800682169253 0.334237425269950 0.743319742477540
2.099742314313267 0.329709128744430 0.685953130712018
2.253483605428042 0.338209143902201 0.794027010792921
2.139849820112224 0.332063175615470 0.714018808416182
2.250143469020041 0.338136253085361 0.791600043424550
2.264735780708348 0.338979274263224 0.801680191863518
2.425121660100526 0.347436401511180 0.914625338218002
2.206590644219017 0.335830510968584 0.760892479739662
2.189826738892797 0.334948331690477 0.749202347672420
2.069051029835663 0.328235256714593 0.664845519474291
2.391186717627713 0.345755663706005 0.891100361136644
2.478723828708481 0.350304667654797 0.952470631759343
2.633589418757750 0.357943374909926 1.062259709272963
2.501720459872961 0.351218582106388 0.969405568955396
2.438825464623843 0.348074452736294 0.924486170126454
2.402956953910124 0.346226899680829 0.899047137304136
2.524642865536631 0.352419486777799 0.985020882838327
2.486592708507011 0.350410839822111 0.958347818799192
2.561198294838873 0.354135408220830 1.011115336262727
2.320611782924737 0.341730318797737 0.841256200313256
2.279686641907904 0.339623952830723 0.812097446193594
2.192677970879956 0.334934939278205 0.750983611681066
2.034253696137675 0.326074943710870 0.640293522184461
2.100411653364924 0.329874859982984 0.687004183670506
2.136363142365890 0.331978934678318 0.712025267361496
2.145765618417357 0.332571647651874 0.718576738965439
2.015355353786295 0.325223748826715 0.627682513187217
2.144497911280442 0.332597163880719 0.718235199174144
2.184419901142909 0.334907791330299 0.745855884353715
2.156941988546521 0.333440304455754 0.726637490761326
2.164896092557094 0.333922888423381 0.732317236030551
2.142495889557134 0.332723978543999 0.716747302318746
1.972335146672318 0.323009944472129 0.598611382636265
1.960032978731420 0.322337700909600 0.590822458953444
1.892736021185325 0.318399928224863 0.544712037197812
1.817727518077365 0.313890597043592 0.493800641801013
1.732818354432900 0.308638151751227 0.436587334970866
1.709712053275818 0.307294092052731 0.421979569450315
1.560777278572816 0.297457158767192 0.322157189475494
1.678355925543266 0.305618851041591 0.403484108249424] ;
1.984702489138465 0.335169748463059 0.670420465974991
1.797086108881765 0.323738578123985 0.547308667595199
1.868444017934854 0.328080679826740 0.593052853366243
1.895360226929111 0.329595817929623 0.609928225756056
1.790832321540929 0.323045792420179 0.541464341531705
1.760361113136238 0.321043326280900 0.521508650424371
1.790915969739093 0.322955490721488 0.540943037175086
2.094179862755653 0.340746414276014 0.739070344706716
2.351323603033167 0.353813072593956 0.910247160484619
2.210203726655083 0.345882571920415 0.814539583358436
2.502764243167320 0.360529072208579 1.010034424820335
2.569208789183717 0.362428841518866 1.055534562597981
2.547595154425792 0.360952177511515 1.039047992042150
2.609146531246866 0.363696577503416 1.078846711754488
2.571616001378042 0.361498291257734 1.051509986784717
2.541891024016321 0.360071155104088 1.028624099377237
2.689409275114334 0.366815600832908 1.128105032869184
2.836542116534716 0.372524050373151 1.229814150394072
2.989371778822207 0.378100564290163 1.336372695875410
3.053527484610819 0.379663367671839 1.381646099750626
2.881583926807516 0.371937515643922 1.259734111646857
2.937243454748999 0.375283171360020 1.293755438734926
3.118203726771490 0.382439157449350 1.420284000580079
3.162221425436911 0.382978730072962 1.452879778911405
3.270131116244304 0.387045130060735 1.528307700189284
3.342461488854179 0.389086673292955 1.580437828600709
3.273192452854725 0.385774052536333 1.531120751032252
3.275458381986319 0.386357608290016 1.529824198671000
3.140839718197673 0.380646875429989 1.433095635793685
3.219561570532605 0.384603663097986 1.485897119680615
3.046020484023621 0.376619364484571 1.363233558132235
2.875797146770958 0.369735139885355 1.238996996305890
2.749622178822991 0.364254301976450 1.147444649402347
2.392412920492719 0.346784183865998 0.894670846513585
2.538569352588205 0.354489172654320 0.995609156305664
2.568582116289918 0.355797653561804 1.017051641895211
2.473671797066097 0.350928176810026 0.950257635346841
2.620458952999331 0.358256344008751 1.053181588833955
2.417877040613256 0.347870025062447 0.911027320823617
2.397670314991495 0.346921694035742 0.896082963087687
2.366883065577286 0.345289845529682 0.874408874120826
2.398421161488027 0.346918229004658 0.896452534897949
2.429022432917506 0.348458911692765 0.917940360480214
2.329480001673114 0.343218039531235 0.848090572728616
2.323778203248307 0.342928605968239 0.843955176095121
2.304540951504139 0.341899250525543 0.830468123386457
2.371683909087846 0.345441636785679 0.877514351279621
2.490195690751581 0.351506590301081 0.960838542863225
2.611493982190879 0.357442690934199 1.046618170917642
2.503405760920729 0.351887256856341 0.970703524500816
2.502374477458479 0.351865505580769 0.969514474424414
2.359478710434038 0.344470328092121 0.868876338341471
2.235614401552562 0.337896673011709 0.781763976906244
2.237065512060965 0.337998138421979 0.782823153982811
2.405249293222310 0.346934628008361 0.900834255435682
2.317208444296528 0.342286974469216 0.839012239040374
2.356353796613430 0.344364397044866 0.866418340883992
2.329623188746103 0.342942028228397 0.847657055734664
2.451699791573160 0.349287377428137 0.933477131054643
2.326653326931049 0.342720642543720 0.845654324922242
2.328176409623511 0.342824741941796 0.846575965562970
2.387605984815603 0.345939128892875 0.888332186956944
2.508162718702005 0.352082240173918 0.973304394397491
2.682098704221850 0.360548632109151 1.096619975241019
2.683210187517440 0.360334208336806 1.098196347992521
2.495448180812561 0.351002978084749 0.965191387615425
2.400677321318541 0.346260011274923 0.897566056014340
2.279709427240636 0.339905112366486 0.812280162193439
2.543742139352676 0.353571759314430 0.998416614177836
2.466804544683231 0.349570487450388 0.944374705292784
2.545923232397798 0.353562161906674 1.000133847612044
2.516609766492527 0.351998960811952 0.979615171231177
2.612598123816773 0.356735709969249 1.047580818676070
2.514581877733644 0.351736314350723 0.978472497403178
2.346814819442599 0.343151537387364 0.859593502999736
2.190061053436186 0.334783668048696 0.749123665788591
2.248248190346710 0.337975537211722 0.790133451151325
2.231245577955952 0.337099249591117 0.778120306643938
2.213620813638347 0.336172963701584 0.765787919679999
2.372368622485876 0.344669139219734 0.877475808694303
2.402394532412963 0.346236714114806 0.898578702308663
2.421632200543405 0.347211723112796 0.912182166100545
2.600814823475984 0.356206951763316 1.039020125139189
2.499717430182296 0.351010191098421 0.967897548419094
2.572211042595633 0.354659119526649 1.018967108776286
2.663557373274198 0.359030754462987 1.084127294941044
2.624508384540186 0.356972637699486 1.056848324055082
2.638578391882532 0.357631581496546 1.066764536958948
2.490619544707827 0.350219619250241 0.961836430307891
2.351499685312523 0.343126531712676 0.862944429125821
2.361744409273265 0.343693557597678 0.870045243822348
2.442494968080141 0.347873202461086 0.927160968018594
2.745123805313629 0.362770643020118 1.142349343426111
2.655499503705102 0.358132929197389 1.079779897215503
2.663850696079126 0.358574973979539 1.085379958290025
2.642540272757401 0.357462408799286 1.070401889504760
2.404037994048185 0.345491588561572 0.900884395443159
2.348769349405146 0.342712258600463 0.861219163642359
2.151645849089095 0.332135094769575 0.722080451054128
2.252343203542463 0.337640454116440 0.793256172150181
2.158313350236808 0.332590653949928 0.726803768436609
2.177375300770910 0.333675009914873 0.740364253592691
2.125333870619463 0.330857624626525 0.703750112206580
2.166601866570710 0.333192210611845 0.732859178568121
2.108843923653465 0.330052027456209 0.692243810014626
2.170141182101418 0.333505871231270 0.735409067431057
2.254451075620278 0.338167643418567 0.794516594921980
2.446506792318999 0.348291161505242 0.929849297341202
2.420231514001146 0.346916032088861 0.911318264635804
2.181800682169253 0.334237425269950 0.743319742477540
2.099742314313267 0.329709128744430 0.685953130712018
2.253483605428042 0.338209143902201 0.794027010792921
2.139849820112224 0.332063175615470 0.714018808416182
2.250143469020041 0.338136253085361 0.791600043424550
2.264735780708348 0.338979274263224 0.801680191863518
2.425121660100526 0.347436401511180 0.914625338218002
2.206590644219017 0.335830510968584 0.760892479739662
2.189826738892797 0.334948331690477 0.749202347672420
2.069051029835663 0.328235256714593 0.664845519474291
2.391186717627713 0.345755663706005 0.891100361136644
2.478723828708481 0.350304667654797 0.952470631759343
2.633589418757750 0.357943374909926 1.062259709272963
2.501720459872961 0.351218582106388 0.969405568955396
2.438825464623843 0.348074452736294 0.924486170126454
2.402956953910124 0.346226899680829 0.899047137304136
2.524642865536631 0.352419486777799 0.985020882838327
2.486592708507011 0.350410839822111 0.958347818799192
2.561198294838873 0.354135408220830 1.011115336262727
2.320611782924737 0.341730318797737 0.841256200313256
2.279686641907904 0.339623952830723 0.812097446193594
2.192677970879956 0.334934939278205 0.750983611681066
2.034253696137675 0.326074943710870 0.640293522184461
2.100411653364924 0.329874859982984 0.687004183670506
2.136363142365890 0.331978934678318 0.712025267361496
2.145765618417357 0.332571647651874 0.718576738965439
2.015355353786295 0.325223748826715 0.627682513187217
2.144497911280442 0.332597163880719 0.718235199174144
2.184419901142909 0.334907791330299 0.745855884353715
2.156941988546521 0.333440304455754 0.726637490761326
2.164896092557094 0.333922888423381 0.732317236030551
2.142495889557134 0.332723978543999 0.716747302318746
1.972335146672318 0.323009944472129 0.598611382636265
1.960032978731420 0.322337700909600 0.590822458953444
1.892736021185325 0.318399928224863 0.544712037197812
1.817727518077365 0.313890597043592 0.493800641801013
1.732818354432900 0.308638151751227 0.436587334970866
1.709712053275818 0.307294092052731 0.421979569450315
1.560777278572816 0.297457158767192 0.322157189475494
1.678355925543266 0.305618851041591 0.403484108249424] ;
set_dynare_seed('default');

View File

@ -1,153 +1,153 @@
series = [ 1.831805242058402 0.326183687045750 0.571394980772413
1.984702489138465 0.335169748463059 0.670420465974991
1.797086108881765 0.323738578123985 0.547308667595199
1.868444017934854 0.328080679826740 0.593052853366243
1.895360226929111 0.329595817929623 0.609928225756056
1.790832321540929 0.323045792420179 0.541464341531705
1.760361113136238 0.321043326280900 0.521508650424371
1.790915969739093 0.322955490721488 0.540943037175086
2.094179862755653 0.340746414276014 0.739070344706716
2.351323603033167 0.353813072593956 0.910247160484619
2.210203726655083 0.345882571920415 0.814539583358436
2.502764243167320 0.360529072208579 1.010034424820335
2.569208789183717 0.362428841518866 1.055534562597981
2.547595154425792 0.360952177511515 1.039047992042150
2.609146531246866 0.363696577503416 1.078846711754488
2.571616001378042 0.361498291257734 1.051509986784717
2.541891024016321 0.360071155104088 1.028624099377237
2.689409275114334 0.366815600832908 1.128105032869184
2.836542116534716 0.372524050373151 1.229814150394072
2.989371778822207 0.378100564290163 1.336372695875410
3.053527484610819 0.379663367671839 1.381646099750626
2.881583926807516 0.371937515643922 1.259734111646857
2.937243454748999 0.375283171360020 1.293755438734926
3.118203726771490 0.382439157449350 1.420284000580079
3.162221425436911 0.382978730072962 1.452879778911405
3.270131116244304 0.387045130060735 1.528307700189284
3.342461488854179 0.389086673292955 1.580437828600709
3.273192452854725 0.385774052536333 1.531120751032252
3.275458381986319 0.386357608290016 1.529824198671000
3.140839718197673 0.380646875429989 1.433095635793685
3.219561570532605 0.384603663097986 1.485897119680615
3.046020484023621 0.376619364484571 1.363233558132235
2.875797146770958 0.369735139885355 1.238996996305890
2.749622178822991 0.364254301976450 1.147444649402347
2.392412920492719 0.346784183865998 0.894670846513585
2.538569352588205 0.354489172654320 0.995609156305664
2.568582116289918 0.355797653561804 1.017051641895211
2.473671797066097 0.350928176810026 0.950257635346841
2.620458952999331 0.358256344008751 1.053181588833955
2.417877040613256 0.347870025062447 0.911027320823617
2.397670314991495 0.346921694035742 0.896082963087687
2.366883065577286 0.345289845529682 0.874408874120826
2.398421161488027 0.346918229004658 0.896452534897949
2.429022432917506 0.348458911692765 0.917940360480214
2.329480001673114 0.343218039531235 0.848090572728616
2.323778203248307 0.342928605968239 0.843955176095121
2.304540951504139 0.341899250525543 0.830468123386457
2.371683909087846 0.345441636785679 0.877514351279621
2.490195690751581 0.351506590301081 0.960838542863225
2.611493982190879 0.357442690934199 1.046618170917642
2.503405760920729 0.351887256856341 0.970703524500816
2.502374477458479 0.351865505580769 0.969514474424414
2.359478710434038 0.344470328092121 0.868876338341471
2.235614401552562 0.337896673011709 0.781763976906244
2.237065512060965 0.337998138421979 0.782823153982811
2.405249293222310 0.346934628008361 0.900834255435682
2.317208444296528 0.342286974469216 0.839012239040374
2.356353796613430 0.344364397044866 0.866418340883992
2.329623188746103 0.342942028228397 0.847657055734664
2.451699791573160 0.349287377428137 0.933477131054643
2.326653326931049 0.342720642543720 0.845654324922242
2.328176409623511 0.342824741941796 0.846575965562970
2.387605984815603 0.345939128892875 0.888332186956944
2.508162718702005 0.352082240173918 0.973304394397491
2.682098704221850 0.360548632109151 1.096619975241019
2.683210187517440 0.360334208336806 1.098196347992521
2.495448180812561 0.351002978084749 0.965191387615425
2.400677321318541 0.346260011274923 0.897566056014340
2.279709427240636 0.339905112366486 0.812280162193439
2.543742139352676 0.353571759314430 0.998416614177836
2.466804544683231 0.349570487450388 0.944374705292784
2.545923232397798 0.353562161906674 1.000133847612044
2.516609766492527 0.351998960811952 0.979615171231177
2.612598123816773 0.356735709969249 1.047580818676070
2.514581877733644 0.351736314350723 0.978472497403178
2.346814819442599 0.343151537387364 0.859593502999736
2.190061053436186 0.334783668048696 0.749123665788591
2.248248190346710 0.337975537211722 0.790133451151325
2.231245577955952 0.337099249591117 0.778120306643938
2.213620813638347 0.336172963701584 0.765787919679999
2.372368622485876 0.344669139219734 0.877475808694303
2.402394532412963 0.346236714114806 0.898578702308663
2.421632200543405 0.347211723112796 0.912182166100545
2.600814823475984 0.356206951763316 1.039020125139189
2.499717430182296 0.351010191098421 0.967897548419094
2.572211042595633 0.354659119526649 1.018967108776286
2.663557373274198 0.359030754462987 1.084127294941044
2.624508384540186 0.356972637699486 1.056848324055082
2.638578391882532 0.357631581496546 1.066764536958948
2.490619544707827 0.350219619250241 0.961836430307891
2.351499685312523 0.343126531712676 0.862944429125821
2.361744409273265 0.343693557597678 0.870045243822348
2.442494968080141 0.347873202461086 0.927160968018594
2.745123805313629 0.362770643020118 1.142349343426111
2.655499503705102 0.358132929197389 1.079779897215503
2.663850696079126 0.358574973979539 1.085379958290025
2.642540272757401 0.357462408799286 1.070401889504760
2.404037994048185 0.345491588561572 0.900884395443159
2.348769349405146 0.342712258600463 0.861219163642359
2.151645849089095 0.332135094769575 0.722080451054128
2.252343203542463 0.337640454116440 0.793256172150181
2.158313350236808 0.332590653949928 0.726803768436609
2.177375300770910 0.333675009914873 0.740364253592691
2.125333870619463 0.330857624626525 0.703750112206580
2.166601866570710 0.333192210611845 0.732859178568121
2.108843923653465 0.330052027456209 0.692243810014626
2.170141182101418 0.333505871231270 0.735409067431057
2.254451075620278 0.338167643418567 0.794516594921980
2.446506792318999 0.348291161505242 0.929849297341202
2.420231514001146 0.346916032088861 0.911318264635804
2.181800682169253 0.334237425269950 0.743319742477540
2.099742314313267 0.329709128744430 0.685953130712018
2.253483605428042 0.338209143902201 0.794027010792921
2.139849820112224 0.332063175615470 0.714018808416182
2.250143469020041 0.338136253085361 0.791600043424550
2.264735780708348 0.338979274263224 0.801680191863518
2.425121660100526 0.347436401511180 0.914625338218002
2.206590644219017 0.335830510968584 0.760892479739662
2.189826738892797 0.334948331690477 0.749202347672420
2.069051029835663 0.328235256714593 0.664845519474291
2.391186717627713 0.345755663706005 0.891100361136644
2.478723828708481 0.350304667654797 0.952470631759343
2.633589418757750 0.357943374909926 1.062259709272963
2.501720459872961 0.351218582106388 0.969405568955396
2.438825464623843 0.348074452736294 0.924486170126454
2.402956953910124 0.346226899680829 0.899047137304136
2.524642865536631 0.352419486777799 0.985020882838327
2.486592708507011 0.350410839822111 0.958347818799192
2.561198294838873 0.354135408220830 1.011115336262727
2.320611782924737 0.341730318797737 0.841256200313256
2.279686641907904 0.339623952830723 0.812097446193594
2.192677970879956 0.334934939278205 0.750983611681066
2.034253696137675 0.326074943710870 0.640293522184461
2.100411653364924 0.329874859982984 0.687004183670506
2.136363142365890 0.331978934678318 0.712025267361496
2.145765618417357 0.332571647651874 0.718576738965439
2.015355353786295 0.325223748826715 0.627682513187217
2.144497911280442 0.332597163880719 0.718235199174144
2.184419901142909 0.334907791330299 0.745855884353715
2.156941988546521 0.333440304455754 0.726637490761326
2.164896092557094 0.333922888423381 0.732317236030551
2.142495889557134 0.332723978543999 0.716747302318746
1.972335146672318 0.323009944472129 0.598611382636265
1.960032978731420 0.322337700909600 0.590822458953444
1.892736021185325 0.318399928224863 0.544712037197812
1.817727518077365 0.313890597043592 0.493800641801013
1.732818354432900 0.308638151751227 0.436587334970866
1.709712053275818 0.307294092052731 0.421979569450315
1.560777278572816 0.297457158767192 0.322157189475494
1.678355925543266 0.305618851041591 0.403484108249424] ;
1.984702489138465 0.335169748463059 0.670420465974991
1.797086108881765 0.323738578123985 0.547308667595199
1.868444017934854 0.328080679826740 0.593052853366243
1.895360226929111 0.329595817929623 0.609928225756056
1.790832321540929 0.323045792420179 0.541464341531705
1.760361113136238 0.321043326280900 0.521508650424371
1.790915969739093 0.322955490721488 0.540943037175086
2.094179862755653 0.340746414276014 0.739070344706716
2.351323603033167 0.353813072593956 0.910247160484619
2.210203726655083 0.345882571920415 0.814539583358436
2.502764243167320 0.360529072208579 1.010034424820335
2.569208789183717 0.362428841518866 1.055534562597981
2.547595154425792 0.360952177511515 1.039047992042150
2.609146531246866 0.363696577503416 1.078846711754488
2.571616001378042 0.361498291257734 1.051509986784717
2.541891024016321 0.360071155104088 1.028624099377237
2.689409275114334 0.366815600832908 1.128105032869184
2.836542116534716 0.372524050373151 1.229814150394072
2.989371778822207 0.378100564290163 1.336372695875410
3.053527484610819 0.379663367671839 1.381646099750626
2.881583926807516 0.371937515643922 1.259734111646857
2.937243454748999 0.375283171360020 1.293755438734926
3.118203726771490 0.382439157449350 1.420284000580079
3.162221425436911 0.382978730072962 1.452879778911405
3.270131116244304 0.387045130060735 1.528307700189284
3.342461488854179 0.389086673292955 1.580437828600709
3.273192452854725 0.385774052536333 1.531120751032252
3.275458381986319 0.386357608290016 1.529824198671000
3.140839718197673 0.380646875429989 1.433095635793685
3.219561570532605 0.384603663097986 1.485897119680615
3.046020484023621 0.376619364484571 1.363233558132235
2.875797146770958 0.369735139885355 1.238996996305890
2.749622178822991 0.364254301976450 1.147444649402347
2.392412920492719 0.346784183865998 0.894670846513585
2.538569352588205 0.354489172654320 0.995609156305664
2.568582116289918 0.355797653561804 1.017051641895211
2.473671797066097 0.350928176810026 0.950257635346841
2.620458952999331 0.358256344008751 1.053181588833955
2.417877040613256 0.347870025062447 0.911027320823617
2.397670314991495 0.346921694035742 0.896082963087687
2.366883065577286 0.345289845529682 0.874408874120826
2.398421161488027 0.346918229004658 0.896452534897949
2.429022432917506 0.348458911692765 0.917940360480214
2.329480001673114 0.343218039531235 0.848090572728616
2.323778203248307 0.342928605968239 0.843955176095121
2.304540951504139 0.341899250525543 0.830468123386457
2.371683909087846 0.345441636785679 0.877514351279621
2.490195690751581 0.351506590301081 0.960838542863225
2.611493982190879 0.357442690934199 1.046618170917642
2.503405760920729 0.351887256856341 0.970703524500816
2.502374477458479 0.351865505580769 0.969514474424414
2.359478710434038 0.344470328092121 0.868876338341471
2.235614401552562 0.337896673011709 0.781763976906244
2.237065512060965 0.337998138421979 0.782823153982811
2.405249293222310 0.346934628008361 0.900834255435682
2.317208444296528 0.342286974469216 0.839012239040374
2.356353796613430 0.344364397044866 0.866418340883992
2.329623188746103 0.342942028228397 0.847657055734664
2.451699791573160 0.349287377428137 0.933477131054643
2.326653326931049 0.342720642543720 0.845654324922242
2.328176409623511 0.342824741941796 0.846575965562970
2.387605984815603 0.345939128892875 0.888332186956944
2.508162718702005 0.352082240173918 0.973304394397491
2.682098704221850 0.360548632109151 1.096619975241019
2.683210187517440 0.360334208336806 1.098196347992521
2.495448180812561 0.351002978084749 0.965191387615425
2.400677321318541 0.346260011274923 0.897566056014340
2.279709427240636 0.339905112366486 0.812280162193439
2.543742139352676 0.353571759314430 0.998416614177836
2.466804544683231 0.349570487450388 0.944374705292784
2.545923232397798 0.353562161906674 1.000133847612044
2.516609766492527 0.351998960811952 0.979615171231177
2.612598123816773 0.356735709969249 1.047580818676070
2.514581877733644 0.351736314350723 0.978472497403178
2.346814819442599 0.343151537387364 0.859593502999736
2.190061053436186 0.334783668048696 0.749123665788591
2.248248190346710 0.337975537211722 0.790133451151325
2.231245577955952 0.337099249591117 0.778120306643938
2.213620813638347 0.336172963701584 0.765787919679999
2.372368622485876 0.344669139219734 0.877475808694303
2.402394532412963 0.346236714114806 0.898578702308663
2.421632200543405 0.347211723112796 0.912182166100545
2.600814823475984 0.356206951763316 1.039020125139189
2.499717430182296 0.351010191098421 0.967897548419094
2.572211042595633 0.354659119526649 1.018967108776286
2.663557373274198 0.359030754462987 1.084127294941044
2.624508384540186 0.356972637699486 1.056848324055082
2.638578391882532 0.357631581496546 1.066764536958948
2.490619544707827 0.350219619250241 0.961836430307891
2.351499685312523 0.343126531712676 0.862944429125821
2.361744409273265 0.343693557597678 0.870045243822348
2.442494968080141 0.347873202461086 0.927160968018594
2.745123805313629 0.362770643020118 1.142349343426111
2.655499503705102 0.358132929197389 1.079779897215503
2.663850696079126 0.358574973979539 1.085379958290025
2.642540272757401 0.357462408799286 1.070401889504760
2.404037994048185 0.345491588561572 0.900884395443159
2.348769349405146 0.342712258600463 0.861219163642359
2.151645849089095 0.332135094769575 0.722080451054128
2.252343203542463 0.337640454116440 0.793256172150181
2.158313350236808 0.332590653949928 0.726803768436609
2.177375300770910 0.333675009914873 0.740364253592691
2.125333870619463 0.330857624626525 0.703750112206580
2.166601866570710 0.333192210611845 0.732859178568121
2.108843923653465 0.330052027456209 0.692243810014626
2.170141182101418 0.333505871231270 0.735409067431057
2.254451075620278 0.338167643418567 0.794516594921980
2.446506792318999 0.348291161505242 0.929849297341202
2.420231514001146 0.346916032088861 0.911318264635804
2.181800682169253 0.334237425269950 0.743319742477540
2.099742314313267 0.329709128744430 0.685953130712018
2.253483605428042 0.338209143902201 0.794027010792921
2.139849820112224 0.332063175615470 0.714018808416182
2.250143469020041 0.338136253085361 0.791600043424550
2.264735780708348 0.338979274263224 0.801680191863518
2.425121660100526 0.347436401511180 0.914625338218002
2.206590644219017 0.335830510968584 0.760892479739662
2.189826738892797 0.334948331690477 0.749202347672420
2.069051029835663 0.328235256714593 0.664845519474291
2.391186717627713 0.345755663706005 0.891100361136644
2.478723828708481 0.350304667654797 0.952470631759343
2.633589418757750 0.357943374909926 1.062259709272963
2.501720459872961 0.351218582106388 0.969405568955396
2.438825464623843 0.348074452736294 0.924486170126454
2.402956953910124 0.346226899680829 0.899047137304136
2.524642865536631 0.352419486777799 0.985020882838327
2.486592708507011 0.350410839822111 0.958347818799192
2.561198294838873 0.354135408220830 1.011115336262727
2.320611782924737 0.341730318797737 0.841256200313256
2.279686641907904 0.339623952830723 0.812097446193594
2.192677970879956 0.334934939278205 0.750983611681066
2.034253696137675 0.326074943710870 0.640293522184461
2.100411653364924 0.329874859982984 0.687004183670506
2.136363142365890 0.331978934678318 0.712025267361496
2.145765618417357 0.332571647651874 0.718576738965439
2.015355353786295 0.325223748826715 0.627682513187217
2.144497911280442 0.332597163880719 0.718235199174144
2.184419901142909 0.334907791330299 0.745855884353715
2.156941988546521 0.333440304455754 0.726637490761326
2.164896092557094 0.333922888423381 0.732317236030551
2.142495889557134 0.332723978543999 0.716747302318746
1.972335146672318 0.323009944472129 0.598611382636265
1.960032978731420 0.322337700909600 0.590822458953444
1.892736021185325 0.318399928224863 0.544712037197812
1.817727518077365 0.313890597043592 0.493800641801013
1.732818354432900 0.308638151751227 0.436587334970866
1.709712053275818 0.307294092052731 0.421979569450315
1.560777278572816 0.297457158767192 0.322157189475494
1.678355925543266 0.305618851041591 0.403484108249424] ;
set_dynare_seed('default');

View File

@ -1,9 +1,9 @@
function printMakeCheckMatlabErrMsg(modfilename, exception)
fprintf('\n********************************************\n');
disp('*** DYNARE-TEST-MATLAB ERROR ENCOUNTERED ***');
disp('********************************************');
disp([' WHILE RUNNING MODFILE: ' modfilename]);
fprintf('\n');
disp(getReport(exception));
fprintf('*************************************\n\n\n');
fprintf('\n********************************************\n');
disp('*** DYNARE-TEST-MATLAB ERROR ENCOUNTERED ***');
disp('********************************************');
disp([' WHILE RUNNING MODFILE: ' modfilename]);
fprintf('\n');
disp(getReport(exception));
fprintf('*************************************\n\n\n');
end

View File

@ -1,14 +1,14 @@
function printMakeCheckOctaveErrMsg(modfilename, err)
printf("\n");
printf("********************************************\n");
printf("*** DYNARE-TEST-OCTAVE ERROR ENCOUNTERED ***\n");
printf("********************************************\n");
printf(" WHILE RUNNING MODFILE: %s\n", modfilename);
printf(" MSG: %s\n", err.message);
if (isfield(err, 'stack'))
printf(" IN FILE: %s\n", err.stack(1).file);
printf(" IN FUNCTION: %s\n", err.stack(1).name);
printf(" ON LINE and COLUMN: %d and %d\n",err.stack(1).line,err.stack(1).column);
end
printf("*************************************\n\n\n");
printf("\n");
printf("********************************************\n");
printf("*** DYNARE-TEST-OCTAVE ERROR ENCOUNTERED ***\n");
printf("********************************************\n");
printf(" WHILE RUNNING MODFILE: %s\n", modfilename);
printf(" MSG: %s\n", err.message);
if (isfield(err, 'stack'))
printf(" IN FILE: %s\n", err.stack(1).file);
printf(" IN FUNCTION: %s\n", err.stack(1).name);
printf(" ON LINE and COLUMN: %d and %d\n",err.stack(1).line,err.stack(1).column);
end
printf("*************************************\n\n\n");
end

View File

@ -1,98 +1,98 @@
data = [0.928467646476 11.8716889412 20 0.418037507392 0.227382377518 ...
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
-0.705994063083 11.7522582094 21.25 1.09254424511 -1.29488274994 ...
-0.511895351926 9.68144025625 17.25 -1.66150408407 0.331508393098 ...
-0.990955971267 10.0890781236 17 1.43016275252 -2.43589670141 ...
-0.981233061806 12.1094840679 18.25 2.91293288733 -0.790246576864 ...
-0.882182844512 8.54559460406 15 0.419579139481 0.358729719566 ...
-0.930893002836 6.19238374422 12.5 -1.48847457959 0.739779938797 ...
1.53158206947 2.76544271886 11.5 -0.336216769682 0.455559918769 ...
2.2659052834 5.47418162513 11 0.306436789767 -0.0707985731221 ...
1.05419803797 6.35698426189 11 0.140700250477 0.620401487202 ...
1.20161076793 3.4253301593 11 0.461296492351 0.14354323987 ...
1.73934077971 4.70926070322 11.5 1.35798282982 0.38564694435 ...
1.71735262584 3.54232079749 12.5 2.9097529155 -0.804308583301 ...
0.426343657844 3.32719108897 13 1.64214862652 -1.18214664701 ...
1.67751812324 2.93444727338 11.25 0.344434910651 -1.6529373719 ...
1.37013301099 4.72303361923 11.75 2.61511526582 0.327684243041 ...
0.281231073781 4.4893853071 10.5 1.17043449257 1.12855106649 ...
1.53638992834 3.7325309699 10.25 -0.683947046728 0.11943538737 ...
1.68081431462 3.34729969129 10 1.41159342106 -1.59065680853 ...
-0.343321601133 5.05563513564 12 1.75117366498 -2.40127764642 ...
0.873415608666 3.2779996255 10.25 -1.39895866711 0.0971444398216 ...
0.26399696544 4.78229419828 9.75 0.0914692438124 0.299310457612 ...
-0.562233624818 3.88598638237 9.75 -0.0505384765105 0.332826708151 ...
2.15161914936 3.84859710132 8.75 -3.44811080489 0.789138678784 ...
1.2345093726 5.62225030942 9.5 -0.366945407434 2.32974981198 ...
1.62554967459 4.24667132831 10 -0.800958371402 0.0293183770935 ...
1.33035402527 2.75248979249 9.75 -0.855723113225 0.852493939813 ...
1.52078814077 3.53415985826 9.75 -3.37963469203 -1.05133958119 ...
1.16704983697 4.92754079464 10.75 -3.0142303324 0.459907431978 ...
0.277213572101 4.55532133037 11.75 -0.851995599415 2.03242034852 ...
0.842215068977 3.11164509647 12.25 -1.08290421696 0.014323281961 ...
1.05325028606 4.92882647578 13.5 -1.1953883867 0.706764750654 ...
0.453051253568 6.82998950103 13.5 0.111803656462 0.088462593153 ...
0.199885995525 5.82643354662 13.5 -0.920501518421 -0.26504958666 ...
0.137907999624 2.66076369132 13.5 -1.17122929812 -0.995642430514 ...
0.721949686709 5.70497876823 14.25 1.19378169018 -1.10644839651 ...
-0.418465249225 3.75861110232 14.75 -1.03131674824 0.188507675831 ...
-0.644028342116 4.15104788154 13.75 -1.48911756546 0.204560913792 ...
-0.848213852668 5.65580324027 12.75 0.677011703877 -0.849628054542 ...
-1.51954076928 11.4866911266 11.25 -0.446024680774 -0.456342350765 ...
0.265275055215 2.85472749592 9.75 -0.598778202436 -0.907311640831 ...
0.356162529063 2.29614015658 9.5 -0.46820788432 -1.22130883441 ...
0.368308864363 -0.539083504685 8 -0.781333991956 0.374007246518 ...
-0.145751412732 1.61507621789 8.25 3.68291932628 1.32438399845 ...
0.285457283664 2.14334055993 7 1.42819405379 -0.00818660844123 ...
0.372390129412 1.60000213334 6.25 0.626106424052 -0.10136772765 ...
0.382720203063 1.72614243263 7.25 4.89631941021 -1.10060711916 ...
0.737957515573 2.90430582851 6 -0.0422721010314 0.4178952497 ...
0.649532581668 0.657135682543 6 0.692066153971 0.422299120276 ...
0.627159201987 1.70352689913 5.75 2.62066711305 -1.29237304034 ...
0.905441299817 1.95663197267 5.5 1.5949697565 -0.27115830703 ...
1.49322577898 -2.08741765309 6.25 1.23027694802 0.418336889527 ...
1.48750731567 -1.57274121871 8 3.01660550994 -0.893958254365 ...
1.39783858087 2.22623066426 7 -0.80842319214 1.47625453886 ...
0.89274836317 1.30378081742 8 -0.249485058661 0.159871204185 ...
0.920652246088 4.1437741965 9.75 2.8204453623 0.178149239655 ...
-0.00264276644799 3.07989972052 8.75 -2.56342461535 2.105998353 ...
0.0198190461681 0.766283759256 8 -1.15838865989 1.56888883418 ...
0.440050515311 0.127570085801 7.5 0.0400753569995 0.028914333532 ...
0.129536637901 1.78174141526 6.75 0.959943962785 0.307781224401 ...
0.398549827172 3.03606770667 6.5 -0.340209794742 0.100979469478 ...
1.17174775425 0.629625188037 5.75 0.403003686814 0.902394579377 ...
0.991163981251 2.50862910684 4.75 -1.44963996982 1.16150986945 ...
0.967603566096 2.12003739013 4.75 0.610846030775 -0.889994896068 ...
1.14689383604 1.24185011459 4.75 2.01098091308 -1.73846431001 ...
1.32593824054 0.990713820685 4.75 -0.0955142989332 -0.0369257308362 ...
0.861135002644 -0.24744943605 6 1.72793107135 -0.691506789639 ...
1.26870850151 2.09844764887 6.5 1.50720217572 -1.31399187077 ...
0.260364987715 1.10650139716 6.5 1.13659047496 0.0720441664643 ...
1.09731242214 0.490796381346 7.25 4.59123894147 -2.14073070763 ...
1.63792841781 0.612652594286 6.75 1.79604605035 -0.644363995357 ...
1.48465576034 0.978295808687 6.75 -2.00753620902 1.39437534964 ...
1.0987608663 4.25212569087 6.25 -2.58901196498 2.56054320803 ...
1.42592178132 2.76984518311 6.25 0.888195752358 1.03114549274 ...
1.52958239462 1.31795955491 6.5 -0.902907564082 -0.0952198893776 ...
1.0170168994 2.14733589918 7 -1.3054866978 2.68803738466 ...
0.723253652257 3.43552889347 7.5 1.8213700853 0.592593586195 ...
1.24720806008 3.87383806577 7.5 0.0522300654168 0.988871238698 ...
0.482531471239 2.67793287032 7.5 2.9693944293 -0.108591166081 ...
0.154056100439 0.927269031704 6.75 0.119222057561 3.30489209451 ...
0.0694865769274 6.65916526788 6.25 0.889014476084 -2.83976849035 ...
-0.121267434867 0.341442615696 5.25 0.323053239216 -3.49289229012 ...
0.726473690375 -3.5423730964 4 2.19149290449 -3.20855054004 ...
1.39271709108 2.63121085718 3.75 0.88406577736 0.75622580197 ...
1.07502077727 5.88578836799 4.25 -2.55088273352 2.89018116374 ...
0.759049251607 4.24703604223 4.5 0.575687665685 -0.388292506167 ...
];
data = reshape(data,5,86)';
y_obs = data(:,1);
pie_obs = data(:,2);
R_obs = data(:,3);
de = data(:,4);
dq = data(:,5);
%Country: Canada
%Sample Range: 1981:2 to 2002:3
%Observations: 86

View File

@ -50,7 +50,7 @@ rep = rep.addTable('title', countryName, ...
for i=1:length(seriesNames)
if (any(strcmp(countryAbbr, otherThree)) && ...
any(strcmp(seriesNames{i}{1}, notForOtherThree))) || ...
any(strcmp(seriesNames{i}{1}, notForOtherThree))) || ...
(any(strcmp(countryAbbr, 'US')) && any(strcmp(seriesNames{i}{1}, notForUS))) || ...
(any(strcmp(countryAbbr, firstThree)) && any(strcmp(seriesNames{i}{1}, notForFirstThree)))
continue

View File

@ -202,13 +202,13 @@ rep = rep.addPage('title', {'Jan1 vs Jan2', 'World Oil and Food Prices'}, ...
'titleFormat', {'\large\bfseries', '\large'});
rep = rep.addSection('cols', 1);
rep = rep.addParagraph('text', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', ...
'cols', 2, ...
'heading', '\textbf{My First Paragraph Has Two Columns}');
'cols', 2, ...
'heading', '\textbf{My First Paragraph Has Two Columns}');
rep = rep.addSection('cols', 1);
rep = rep.addParagraph('text', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\newline', ...
'heading', '\textbf{My Next Paragraphs Only Have One}', ...
'indent', false);
'heading', '\textbf{My Next Paragraphs Only Have One}', ...
'indent', false);
rep = rep.addParagraph('text', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\newline');
rep = rep.addSection('cols', 2);

View File

@ -73,14 +73,14 @@ else
fid = fopen('run_all_unitary_tests.m.trs', 'w+');
end
if length(failedtests) > 0
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: %d\n', counter);
fprintf(fid,':number-failed-tests: %d\n', length(failedtests));
fprintf(fid,':list-of-failed-tests: %s\n', failedtests{:});
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: %d\n', counter);
fprintf(fid,':number-failed-tests: %d\n', length(failedtests));
fprintf(fid,':list-of-failed-tests: %s\n', failedtests{:});
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: %d\n', counter);
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: %d\n', counter);
fprintf(fid,':number-failed-tests: 0\n');
end
fprintf(fid,':elapsed-time: %f\n',0.0);
fclose(fid);

View File

@ -29,7 +29,7 @@ addpath([top_test_dir filesep '..' filesep 'matlab']);
% Test Dynare Version
if ~strcmp(dynare_version(), getenv('DYNARE_VERSION'))
error('Incorrect version of Dynare is being tested')
error('Incorrect version of Dynare is being tested')
end
% Test block_bytecode/ls2003.mod with various combinations of
@ -134,14 +134,14 @@ delete('wsMat.mat')
cd(getenv('TOP_TEST_DIR'));
fid = fopen('run_block_byte_tests_matlab.m.trs', 'w+');
if size(failedBlock,2) > 0
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: %d\n', num_block_tests);
fprintf(fid,':number-failed-tests: %d\n', size(failedBlock,2));
fprintf(fid,':list-of-failed-tests: %s\n', failedBlock{:});
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: %d\n', num_block_tests);
fprintf(fid,':number-failed-tests: %d\n', size(failedBlock,2));
fprintf(fid,':list-of-failed-tests: %s\n', failedBlock{:});
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: %d\n', num_block_tests);
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: %d\n', num_block_tests);
fprintf(fid,':number-failed-tests: 0\n');
end
fprintf(fid,':elapsed-time: %f\n', ecput);
fclose(fid);

View File

@ -27,7 +27,7 @@ addpath([top_test_dir filesep '..' filesep 'matlab']);
## Test Dynare Version
if !strcmp(dynare_version(), getenv("DYNARE_VERSION"))
error("Incorrect version of Dynare is being tested")
error("Incorrect version of Dynare is being tested")
endif
## Ask gnuplot to create graphics in text mode
@ -42,92 +42,92 @@ num_block_tests = 0;
cd([top_test_dir filesep 'block_bytecode']);
tic;
for blockFlag = 0:1
for bytecodeFlag = 0:1
default_solve_algo = 2;
default_stack_solve_algo = 0;
if !blockFlag && !bytecodeFlag
solve_algos = 0:4;
stack_solve_algos = [0 6];
elseif blockFlag && !bytecodeFlag
solve_algos = [0:4 6:8];
stack_solve_algos = 0:4;
else
solve_algos = 0:8;
stack_solve_algos = 0:5;
endif
sleep(1) # Workaround for strange race condition related to the _static.m file
for i = 1:length(solve_algos)
num_block_tests = num_block_tests + 1;
if !blockFlag && !bytecodeFlag && (i == 1)
## This is the reference simulation path against which all
## other simulations will be tested
try
old_path = path;
save wsOct
run_ls2003(blockFlag, bytecodeFlag, solve_algos(i), default_stack_solve_algo)
load wsOct
path(old_path);
y_ref = oo_.endo_simul;
save('test.mat','y_ref');
catch
load wsOct
path(old_path);
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], lasterror);
end_try_catch
else
try
old_path = path;
save wsOct
run_ls2003(blockFlag, bytecodeFlag, solve_algos(i), default_stack_solve_algo)
load wsOct
path(old_path);
## Test against the reference simulation path
load('test.mat','y_ref');
diff = oo_.endo_simul - y_ref;
if(abs(diff) > options_.dynatol.x)
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
differr.message = ["ERROR: simulation path differs from the reference path" ];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], differr);
endif
catch
load wsOct
e = lasterror(); # The path() command alters the lasterror, because of io package
path(old_path);
lasterror(e);
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], lasterror);
end_try_catch
endif
endfor
for i = 1:length(stack_solve_algos)
num_block_tests = num_block_tests + 1;
try
old_path = path;
save wsOct
run_ls2003(blockFlag, bytecodeFlag, default_solve_algo, stack_solve_algos(i))
load wsOct
path(old_path);
## Test against the reference simulation path
load('test.mat','y_ref');
diff = oo_.endo_simul - y_ref;
if(abs(diff) > options_.dynatol.x)
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'];
differr.message = ["ERROR: simulation path differs from the reference path" ];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'], differr);
for bytecodeFlag = 0:1
default_solve_algo = 2;
default_stack_solve_algo = 0;
if !blockFlag && !bytecodeFlag
solve_algos = 0:4;
stack_solve_algos = [0 6];
elseif blockFlag && !bytecodeFlag
solve_algos = [0:4 6:8];
stack_solve_algos = 0:4;
else
solve_algos = 0:8;
stack_solve_algos = 0:5;
endif
catch
load wsOct
e = lasterror(); # The path() command alters the lasterror, because of io package
path(old_path);
lasterror(e);
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'], lasterror);
end_try_catch
sleep(1) # Workaround for strange race condition related to the _static.m file
for i = 1:length(solve_algos)
num_block_tests = num_block_tests + 1;
if !blockFlag && !bytecodeFlag && (i == 1)
## This is the reference simulation path against which all
## other simulations will be tested
try
old_path = path;
save wsOct
run_ls2003(blockFlag, bytecodeFlag, solve_algos(i), default_stack_solve_algo)
load wsOct
path(old_path);
y_ref = oo_.endo_simul;
save('test.mat','y_ref');
catch
load wsOct
path(old_path);
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], lasterror);
end_try_catch
else
try
old_path = path;
save wsOct
run_ls2003(blockFlag, bytecodeFlag, solve_algos(i), default_stack_solve_algo)
load wsOct
path(old_path);
## Test against the reference simulation path
load('test.mat','y_ref');
diff = oo_.endo_simul - y_ref;
if(abs(diff) > options_.dynatol.x)
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
differr.message = ["ERROR: simulation path differs from the reference path" ];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], differr);
endif
catch
load wsOct
e = lasterror(); # The path() command alters the lasterror, because of io package
path(old_path);
lasterror(e);
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], lasterror);
end_try_catch
endif
endfor
for i = 1:length(stack_solve_algos)
num_block_tests = num_block_tests + 1;
try
old_path = path;
save wsOct
run_ls2003(blockFlag, bytecodeFlag, default_solve_algo, stack_solve_algos(i))
load wsOct
path(old_path);
## Test against the reference simulation path
load('test.mat','y_ref');
diff = oo_.endo_simul - y_ref;
if(abs(diff) > options_.dynatol.x)
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'];
differr.message = ["ERROR: simulation path differs from the reference path" ];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'], differr);
endif
catch
load wsOct
e = lasterror(); # The path() command alters the lasterror, because of io package
path(old_path);
lasterror(e);
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'];
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'], lasterror);
end_try_catch
endfor
endfor
endfor
endfor
ecput = toc;
delete('wsOct');

View File

@ -22,31 +22,31 @@ top_test_dir = getenv('TOP_TEST_DIR');
cd(directory);
try
mscript;
testFailed = false;
mscript;
testFailed = false;
catch exception
printMakeCheckMatlabErrMsg(strtok(getenv('FILESTEM')), exception);
testFailed = true;
printMakeCheckMatlabErrMsg(strtok(getenv('FILESTEM')), exception);
testFailed = true;
end
cd(top_test_dir);
name = strtok(getenv('FILESTEM'));
fid = fopen([name '.m.tls'], 'w');
if fid < 0
wd = pwd
filestep = getenv('FILESTEM')
error(['ERROR: problem opening file ' name '.m.tls for writing....']);
wd = pwd
filestep = getenv('FILESTEM')
error(['ERROR: problem opening file ' name '.m.tls for writing....']);
end
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.m']);
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.m']);
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.m']);
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.m']);
end
fclose(fid);
exit;

View File

@ -11,42 +11,42 @@
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
load_octave_packages
load_octave_packages
top_test_dir = getenv('TOP_TEST_DIR');
[mfile, name] = strtok(getenv('FILESTEM'));
top_test_dir = getenv('TOP_TEST_DIR');
[mfile, name] = strtok(getenv('FILESTEM'));
[directory, mscript, ext] = fileparts([top_test_dir '/' mfile]);
cd(directory);
[directory, mscript, ext] = fileparts([top_test_dir '/' mfile]);
cd(directory);
try
mscript;
testFailed = false;
catch
printMakeCheckOctaveErrMsg(getenv('FILESTEM'), lasterror);
testFailed = true;
end_try_catch
try
mscript;
testFailed = false;
catch
printMakeCheckOctaveErrMsg(getenv('FILESTEM'), lasterror);
testFailed = true;
end_try_catch
cd(top_test_dir);
name = strtok(getenv('FILESTEM'));
fid = fopen([name '.o.tls'], 'w+');
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.m']);
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.m']);
end
fclose(fid);
cd(top_test_dir);
name = strtok(getenv('FILESTEM'));
fid = fopen([name '.o.tls'], 'w+');
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.m']);
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.m']);
end
fclose(fid);
## Local variables:
## mode: Octave
## End:
## Local variables:
## mode: Octave
## End:

View File

@ -21,7 +21,7 @@ addpath([top_test_dir filesep '..' filesep 'matlab']);
% Test Dynare Version
if ~strcmp(dynare_version(), getenv('DYNARE_VERSION'))
error('Incorrect version of Dynare is being tested')
error('Incorrect version of Dynare is being tested')
end
% To add default directories, empty dseries objects
@ -44,15 +44,15 @@ end
cd(getenv('TOP_TEST_DIR'));
fid = fopen('run_reporting_test_matlab.m.trs', 'w+');
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: run_reporting_test_matlab.m\n');
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: run_reporting_test_matlab.m\n');
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: run_reporting_test_matlab.m\n');
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: run_reporting_test_matlab.m\n');
end
fprintf(fid,':elapsed-time: %f\n',0.0);
fclose(fid);

View File

@ -11,58 +11,58 @@
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
load_octave_packages
load_octave_packages
top_test_dir = getenv('TOP_TEST_DIR');
addpath(top_test_dir);
addpath([top_test_dir filesep '..' filesep 'matlab']);
top_test_dir = getenv('TOP_TEST_DIR');
addpath(top_test_dir);
addpath([top_test_dir filesep '..' filesep 'matlab']);
## Test Dynare Version
if !strcmp(dynare_version(), getenv("DYNARE_VERSION"))
error("Incorrect version of Dynare is being tested")
endif
## Test Dynare Version
if !strcmp(dynare_version(), getenv("DYNARE_VERSION"))
error("Incorrect version of Dynare is being tested")
endif
## Ask gnuplot to create graphics in text mode
## Note that setenv() was introduced in Octave 3.0.2, for compatibility
## with MATLAB
putenv("GNUTERM", "dumb")
## Ask gnuplot to create graphics in text mode
## Note that setenv() was introduced in Octave 3.0.2, for compatibility
## with MATLAB
putenv("GNUTERM", "dumb")
## To add default directories, empty dseries objects
dynare_config([], 0);
## To add default directories, empty dseries objects
dynare_config([], 0);
printf("\n*** TESTING: run_reporting_test_octave.m ***\n");
try
cd([top_test_dir filesep 'reporting']);
db_a = dseries('db_a.csv');
db_q = dseries('db_q.csv');
dc_a = dseries('dc_a.csv');
dc_q = dseries('dc_q.csv');
runDynareReport(dc_a, dc_q, db_a, db_q);
testFailed = false;
catch
testFailed = true;
end
printf("\n*** TESTING: run_reporting_test_octave.m ***\n");
try
cd([top_test_dir filesep 'reporting']);
db_a = dseries('db_a.csv');
db_q = dseries('db_q.csv');
dc_a = dseries('dc_a.csv');
dc_q = dseries('dc_q.csv');
runDynareReport(dc_a, dc_q, db_a, db_q);
testFailed = false;
catch
testFailed = true;
end
cd(getenv('TOP_TEST_DIR'));
fid = fopen('run_reporting_test_octave.o.trs', 'w+');
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: run_reporting_test_octave.m\n');
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: run_reporting_test_octave.m\n');
end
fprintf(fid,':elapsed-time: %f\n',0.0);
fclose(fid);
cd(getenv('TOP_TEST_DIR'));
fid = fopen('run_reporting_test_octave.o.trs', 'w+');
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: run_reporting_test_octave.m\n');
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: run_reporting_test_octave.m\n');
end
fprintf(fid,':elapsed-time: %f\n',0.0);
fclose(fid);
## Local variables:
## mode: Octave
## End:
## Local variables:
## mode: Octave
## End:

View File

@ -21,7 +21,7 @@ addpath([top_test_dir filesep '..' filesep 'matlab']);
% Test Dynare Version
if ~strcmp(dynare_version(), getenv('DYNARE_VERSION'))
error('Incorrect version of Dynare is being tested')
error('Incorrect version of Dynare is being tested')
end
% Test MOD files listed in Makefile.am
@ -35,11 +35,11 @@ disp(['*** TESTING: ' modfile ' ***']);
tic;
save(['wsMat' testfile '.mat']);
try
dynare([testfile ext], 'console')
testFailed = false;
dynare([testfile ext], 'console')
testFailed = false;
catch exception
printMakeCheckMatlabErrMsg(strtok(getenv('FILESTEM')), exception);
testFailed = true;
printMakeCheckMatlabErrMsg(strtok(getenv('FILESTEM')), exception);
testFailed = true;
end
top_test_dir = getenv('TOP_TEST_DIR');
[modfile, name] = strtok(getenv('FILESTEM'));
@ -52,20 +52,20 @@ cd(top_test_dir);
name = strtok(getenv('FILESTEM'));
fid = fopen([name '.m.trs'], 'w');
if fid < 0
wd = pwd
filestep = getenv('FILESTEM')
error(['ERROR: problem opening file ' name '.m.trs for writing....']);
wd = pwd
filestep = getenv('FILESTEM')
error(['ERROR: problem opening file ' name '.m.trs for writing....']);
end
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.mod']);
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.mod']);
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.mod']);
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.mod']);
end
fprintf(fid,':elapsed-time: %f\n', ecput);
fclose(fid);

View File

@ -11,70 +11,70 @@
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
##
## You should have received a copy of the GNU General Public License
## along with Dynare. If not, see <http://www.gnu.org/licenses/>.
## Implementation notes:
##
## Before every call to Dynare, the contents of the workspace is saved in
## 'wsOct', and reloaded after Dynare has finished (this is necessary since
## Dynare does a 'clear -all').
## Implementation notes:
##
## Before every call to Dynare, the contents of the workspace is saved in
## 'wsOct', and reloaded after Dynare has finished (this is necessary since
## Dynare does a 'clear -all').
load_octave_packages
load_octave_packages
top_test_dir = getenv('TOP_TEST_DIR');
addpath(top_test_dir);
addpath([top_test_dir filesep '..' filesep 'matlab']);
top_test_dir = getenv('TOP_TEST_DIR');
addpath(top_test_dir);
addpath([top_test_dir filesep '..' filesep 'matlab']);
## Test Dynare Version
if !strcmp(dynare_version(), getenv("DYNARE_VERSION"))
error("Incorrect version of Dynare is being tested")
endif
## Test Dynare Version
if !strcmp(dynare_version(), getenv("DYNARE_VERSION"))
error("Incorrect version of Dynare is being tested")
endif
## Ask gnuplot to create graphics in text mode
graphics_toolkit gnuplot;
setenv("GNUTERM", "dumb");
## Ask gnuplot to create graphics in text mode
graphics_toolkit gnuplot;
setenv("GNUTERM", "dumb");
## Test MOD files listed in Makefile.am
name = getenv("FILESTEM");
[directory, testfile, ext] = fileparts([top_test_dir '/' name]);
cd(directory);
## Test MOD files listed in Makefile.am
name = getenv("FILESTEM");
[directory, testfile, ext] = fileparts([top_test_dir '/' name]);
cd(directory);
printf("\n*** TESTING: %s ***\n", name);
printf("\n*** TESTING: %s ***\n", name);
tic;
save(['wsOct' testfile '.mat']);
try
dynare([testfile ext])
testFailed = false;
catch
printMakeCheckOctaveErrMsg(getenv("FILESTEM"), lasterror);
testFailed = true;
end_try_catch
top_test_dir = getenv('TOP_TEST_DIR');
name = getenv("FILESTEM");
[directory, testfile, ext] = fileparts([top_test_dir '/' name]);
load(['wsOct' testfile '.mat']);
ecput = toc;
delete(['wsOct' testfile '.mat']);
tic;
save(['wsOct' testfile '.mat']);
try
dynare([testfile ext])
testFailed = false;
catch
printMakeCheckOctaveErrMsg(getenv("FILESTEM"), lasterror);
testFailed = true;
end_try_catch
top_test_dir = getenv('TOP_TEST_DIR');
name = getenv("FILESTEM");
[directory, testfile, ext] = fileparts([top_test_dir '/' name]);
load(['wsOct' testfile '.mat']);
ecput = toc;
delete(['wsOct' testfile '.mat']);
cd(top_test_dir);
fid = fopen([name '.o.trs'], 'w+');
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.mod']);
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.mod']);
end
fprintf(fid,':elapsed-time: %f\n', ecput);
fclose(fid);
cd(top_test_dir);
fid = fopen([name '.o.trs'], 'w+');
if testFailed
fprintf(fid,':test-result: FAIL\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 1\n');
fprintf(fid,':list-of-failed-tests: %s\n', [name '.mod']);
else
fprintf(fid,':test-result: PASS\n');
fprintf(fid,':number-tests: 1\n');
fprintf(fid,':number-failed-tests: 0\n');
fprintf(fid,':list-of-passed-tests: %s\n', [name '.mod']);
end
fprintf(fid,':elapsed-time: %f\n', ecput);
fclose(fid);
## Local variables:
## mode: Octave
## End:
## Local variables:
## mode: Octave
## End:

File diff suppressed because it is too large Load Diff

View File

@ -1,390 +1,390 @@
gp_obs = [
1.0193403
1.0345762
1.0011701
1.0147224
1.008392
1.0488327
1.0153551
1.0099775
1.0260561
1.0172218
1.0014374
1.0184572
1.0179988
1.0060339
1.0019536
0.99179578
1.004346
1.0345153
1.0004432
0.98327074
1.0007585
1.0034378
1.010532
1.0121367
1.0097161
1.0166682
1.0089513
1.0194821
1.0192704
1.0220258
1.020915
1.0176156
1.0040708
1.0157694
1.0357484
1.0256259
1.0240583
1.0095152
1.0241605
1.0115295
1.003636
1.0222399
1.0250969
1.0068969
1.0009829
1.0166179
1.0252018
1.0211178
0.99867851
0.99594002
0.9908135
0.99762919
0.99616309
1.0058679
0.99323315
1.0132879
0.98718922
0.99739822
0.97858594
0.99128769
0.98624299
0.98447966
1.0013312
0.99189504
0.98032699
0.99332035
1.0129565
1.0007785
1.0218292
1.0030419
1.0044453
1.0156181
1.0040112
1.0081137
1.0261598
1.0053686
1.0024674
0.99883223
1.0224791
1.0074723
1.0037807
1.0348866
1.0053664
1.0140072
1.017359
1.0013916
1.017887
1.008987
1.011771
1.0201455
1.0249464
1.0159166
1.0162718
1.0312397
1.0108745
1.0132205
1.0142484
1.0178907
1.0065039
1.0190304
1.0034406
1.0053556
1.012823
1.0009983
1.0073148
1.0247254
1.0140215
1.0053603
1.006169
0.994725
1.026685
1.0012279
1.0160733
1.0119851
1.0148392
0.99760076
1.0070377
1.0066215
0.98130614
1.0127043
1.0203824
1.0067477
0.99510728
1.0188472
1.0100108
1.0146874
1.0118012
1.0111904
0.97759194
0.99081872
0.98425915
1.0026496
0.98587189
0.98648329
1.0035766
1.0094743
0.99460644
0.9953724
1.0194433
1.0065039
1.0056522
1.0160367
1.006524
1.0092492
0.9864426
0.98723638
0.9994522
1.0026778
1.0255529
1.0030477
0.99411719
1.0045087
0.99375289
1.0017609
1.0039766
0.99976299
1.0155671
1.0192975
1.0135507
1.0099869
1.0125994
1.0050808
1.0088531
1.0135256
1.0322097
1.0065808
0.99857526
1.0008792
0.9997691
1.02875
1.0177818
1.0150152
1.026416
1.0209804
1.010633
1.009636
1.0028257
0.9896666
1.0094002
0.99958414
1.0077797
0.98933606
1.0014885
0.99875283
1.005051
1.016385
1.0116282
0.99774103
1.0101802
1.0281101
1.0024654
1.0174549
];
1.0193403
1.0345762
1.0011701
1.0147224
1.008392
1.0488327
1.0153551
1.0099775
1.0260561
1.0172218
1.0014374
1.0184572
1.0179988
1.0060339
1.0019536
0.99179578
1.004346
1.0345153
1.0004432
0.98327074
1.0007585
1.0034378
1.010532
1.0121367
1.0097161
1.0166682
1.0089513
1.0194821
1.0192704
1.0220258
1.020915
1.0176156
1.0040708
1.0157694
1.0357484
1.0256259
1.0240583
1.0095152
1.0241605
1.0115295
1.003636
1.0222399
1.0250969
1.0068969
1.0009829
1.0166179
1.0252018
1.0211178
0.99867851
0.99594002
0.9908135
0.99762919
0.99616309
1.0058679
0.99323315
1.0132879
0.98718922
0.99739822
0.97858594
0.99128769
0.98624299
0.98447966
1.0013312
0.99189504
0.98032699
0.99332035
1.0129565
1.0007785
1.0218292
1.0030419
1.0044453
1.0156181
1.0040112
1.0081137
1.0261598
1.0053686
1.0024674
0.99883223
1.0224791
1.0074723
1.0037807
1.0348866
1.0053664
1.0140072
1.017359
1.0013916
1.017887
1.008987
1.011771
1.0201455
1.0249464
1.0159166
1.0162718
1.0312397
1.0108745
1.0132205
1.0142484
1.0178907
1.0065039
1.0190304
1.0034406
1.0053556
1.012823
1.0009983
1.0073148
1.0247254
1.0140215
1.0053603
1.006169
0.994725
1.026685
1.0012279
1.0160733
1.0119851
1.0148392
0.99760076
1.0070377
1.0066215
0.98130614
1.0127043
1.0203824
1.0067477
0.99510728
1.0188472
1.0100108
1.0146874
1.0118012
1.0111904
0.97759194
0.99081872
0.98425915
1.0026496
0.98587189
0.98648329
1.0035766
1.0094743
0.99460644
0.9953724
1.0194433
1.0065039
1.0056522
1.0160367
1.006524
1.0092492
0.9864426
0.98723638
0.9994522
1.0026778
1.0255529
1.0030477
0.99411719
1.0045087
0.99375289
1.0017609
1.0039766
0.99976299
1.0155671
1.0192975
1.0135507
1.0099869
1.0125994
1.0050808
1.0088531
1.0135256
1.0322097
1.0065808
0.99857526
1.0008792
0.9997691
1.02875
1.0177818
1.0150152
1.026416
1.0209804
1.010633
1.009636
1.0028257
0.9896666
1.0094002
0.99958414
1.0077797
0.98933606
1.0014885
0.99875283
1.005051
1.016385
1.0116282
0.99774103
1.0101802
1.0281101
1.0024654
1.0174549
];
gy_obs = [
1.0114349
0.95979862
1.0203958
1.0071401
1.0539221
0.95944922
1.0051974
1.0354593
0.98747321
1.02788
1.0112772
1.0052673
1.0104239
1.013491
1.0066127
1.0173802
0.98273662
0.95581791
1.0353011
1.0346887
0.9785853
1.0039954
0.99275146
1.0031733
1.0276747
0.978159
0.98248359
1.0192328
0.99057865
0.99776689
0.98890201
1.0163644
1.0300873
0.96109456
0.98850646
1.0115635
1.0010548
0.98951687
0.98151347
1.0106021
1.0310697
0.990769
0.97940286
1.0279158
1.0070844
0.97456591
1.0235486
0.99211813
0.99808011
1.0038972
1.0178385
1.0008656
1.0012176
1.0120603
1.0277974
0.95512181
1.0341867
1.0291133
1.0062875
0.99385308
1.0518127
1.0167908
0.97311489
1.0324251
1.0185255
0.98698556
0.97985038
1.0220522
0.98358428
1.0085008
1.0095106
0.96544852
1.0014508
0.99673838
0.9703847
1.0245765
1.0031506
1.009074
0.98601129
0.99799441
1.0078514
0.98192982
1.0371426
0.97563731
0.99473616
0.99510009
0.98135322
1.0224481
0.99779603
0.98590478
0.98366338
0.99767204
1.0208174
0.97633411
1.0138123
1.0032682
0.99039426
1.0087413
1.0285208
0.98783907
1.0007856
1.0265034
0.99713746
1.0032946
1.0027628
0.99316893
0.99241067
0.99845423
1.0057718
1.029354
0.9717329
1.0218727
0.98185255
0.99861261
1.0114349
1.0052126
0.9852852
0.99669175
1.0131849
0.99253202
0.98255644
1.0164264
1.0070027
0.99306997
1.004557
0.99064231
1.0100364
0.99857545
1.0365648
1.0323947
0.99584546
0.98641189
1.0200377
1.0167671
0.99615647
1.0067481
1.0201624
1.0012265
0.97564063
1.0141995
1.0260671
0.99697599
1.0127951
0.98922525
1.0268872
1.0048837
1.0124301
1.0020776
0.95526625
0.98592847
1.0303405
1.007508
1.0041718
1.0039668
1.0119603
1.0153073
0.99318888
0.96711969
0.99946578
1.0307262
0.97737468
1.0029169
1.0148043
0.97950296
0.97038701
1.010492
1.0087364
0.99717614
1.0375848
0.94419511
0.98325812
1.0350878
0.99049883
0.98795832
1.0191223
1.0148155
0.97941641
1.0395356
1.0005804
0.99178697
1.0024326
1.0312638
1.0100942
0.98526311
1.0029873
0.9836127
0.99747718
1.0193064
0.99270511
0.96646656
1.0575586
0.98945919
];
1.0114349
0.95979862
1.0203958
1.0071401
1.0539221
0.95944922
1.0051974
1.0354593
0.98747321
1.02788
1.0112772
1.0052673
1.0104239
1.013491
1.0066127
1.0173802
0.98273662
0.95581791
1.0353011
1.0346887
0.9785853
1.0039954
0.99275146
1.0031733
1.0276747
0.978159
0.98248359
1.0192328
0.99057865
0.99776689
0.98890201
1.0163644
1.0300873
0.96109456
0.98850646
1.0115635
1.0010548
0.98951687
0.98151347
1.0106021
1.0310697
0.990769
0.97940286
1.0279158
1.0070844
0.97456591
1.0235486
0.99211813
0.99808011
1.0038972
1.0178385
1.0008656
1.0012176
1.0120603
1.0277974
0.95512181
1.0341867
1.0291133
1.0062875
0.99385308
1.0518127
1.0167908
0.97311489
1.0324251
1.0185255
0.98698556
0.97985038
1.0220522
0.98358428
1.0085008
1.0095106
0.96544852
1.0014508
0.99673838
0.9703847
1.0245765
1.0031506
1.009074
0.98601129
0.99799441
1.0078514
0.98192982
1.0371426
0.97563731
0.99473616
0.99510009
0.98135322
1.0224481
0.99779603
0.98590478
0.98366338
0.99767204
1.0208174
0.97633411
1.0138123
1.0032682
0.99039426
1.0087413
1.0285208
0.98783907
1.0007856
1.0265034
0.99713746
1.0032946
1.0027628
0.99316893
0.99241067
0.99845423
1.0057718
1.029354
0.9717329
1.0218727
0.98185255
0.99861261
1.0114349
1.0052126
0.9852852
0.99669175
1.0131849
0.99253202
0.98255644
1.0164264
1.0070027
0.99306997
1.004557
0.99064231
1.0100364
0.99857545
1.0365648
1.0323947
0.99584546
0.98641189
1.0200377
1.0167671
0.99615647
1.0067481
1.0201624
1.0012265
0.97564063
1.0141995
1.0260671
0.99697599
1.0127951
0.98922525
1.0268872
1.0048837
1.0124301
1.0020776
0.95526625
0.98592847
1.0303405
1.007508
1.0041718
1.0039668
1.0119603
1.0153073
0.99318888
0.96711969
0.99946578
1.0307262
0.97737468
1.0029169
1.0148043
0.97950296
0.97038701
1.010492
1.0087364
0.99717614
1.0375848
0.94419511
0.98325812
1.0350878
0.99049883
0.98795832
1.0191223
1.0148155
0.97941641
1.0395356
1.0005804
0.99178697
1.0024326
1.0312638
1.0100942
0.98526311
1.0029873
0.9836127
0.99747718
1.0193064
0.99270511
0.96646656
1.0575586
0.98945919
];

View File

@ -12,26 +12,26 @@ check = 0;
%% Enter model equations here
pi = thetass-1;
en = 1/3;
eR = 1/betta;
y_k = (1/alphha)*(1/betta-1+delta);
ek = en*y_k^(-1/(1-alphha));
ec = ek*(y_k-delta);
em = ec*(a/(1-a))^(-1/b)*((thetass-betta)/thetass)^(-1/b);
ey = ek*y_k;
Xss = a*ec^(1-b)*(1+(a/(1-a))^(-1/b)*((thetass-betta)/thetass)^((b-1)/b));
Psi = (1-alphha)*(ey/en)*Xss^((b-phi1)/(1-b))*a*ec^(-b)*(1-en)^eta;
n = log(en);
k = log(ek);
m = log(em);
c = log(ec);
y = log(ey);
R = log(eR);
z = 0;
u = 0;
pi = thetass-1;
en = 1/3;
eR = 1/betta;
y_k = (1/alphha)*(1/betta-1+delta);
ek = en*y_k^(-1/(1-alphha));
ec = ek*(y_k-delta);
em = ec*(a/(1-a))^(-1/b)*((thetass-betta)/thetass)^(-1/b);
ey = ek*y_k;
Xss = a*ec^(1-b)*(1+(a/(1-a))^(-1/b)*((thetass-betta)/thetass)^((b-1)/b));
Psi = (1-alphha)*(ey/en)*Xss^((b-phi1)/(1-b))*a*ec^(-b)*(1-en)^eta;
n = log(en);
k = log(ek);
m = log(em);
c = log(ec);
y = log(ey);
R = log(eR);
z = 0;
u = 0;
%% end own model equations
for iter = 1:length(M_.params) %update parameters set in the file