Fix some files which were not UTF-8 encoded
parent
393f9e97c5
commit
d9ca83f317
|
@ -3,7 +3,7 @@ function W_opt = optimal_weighting_matrix(m_data, moments, q_lag)
|
|||
% -------------------------------------------------------------------------
|
||||
% This function computes the optimal weigthing matrix by a Bartlett kernel with maximum lag q_lag
|
||||
% Adapted from replication codes of
|
||||
% o Andreasen, Fernández-Villaverde, Rubio-Ramírez (2018): "The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications", Review of Economic Studies, 85(1):1-49.
|
||||
% o Andreasen, Fernández-Villaverde, Rubio-Ramírez (2018): "The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications", Review of Economic Studies, 85(1):1-49.
|
||||
% =========================================================================
|
||||
% INPUTS
|
||||
% o m_data [T x numMom] selected data moments at each point in time
|
||||
|
@ -76,4 +76,4 @@ function GAMA_corr = Corr_Matrix(h_Func,T,num_Mom,v)
|
|||
GAMA_corr = GAMA_corr + h_Func(t-v,:)'*h_Func(t,:);
|
||||
end
|
||||
GAMA_corr = GAMA_corr/T;
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ function [SE_values, Asympt_Var] = standard_errors(xparam, objective_function, B
|
|||
% -------------------------------------------------------------------------
|
||||
% This function computes standard errors to the method of moments estimates
|
||||
% Adapted from replication codes of
|
||||
% o Andreasen, Fernández-Villaverde, Rubio-Ramírez (2018): "The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications", Review of Economic Studies, 85(1):1-49.
|
||||
% o Andreasen, Fernández-Villaverde, Rubio-Ramírez (2018): "The Pruned State-Space System for Non-Linear DSGE Models: Theory and Empirical Applications", Review of Economic Studies, 85(1):1-49.
|
||||
% =========================================================================
|
||||
% INPUTS
|
||||
% o xparam: value of estimated parameters as returned by set_prior()
|
||||
|
@ -115,4 +115,4 @@ else
|
|||
Asympt_Var = 1/T*AA*D'*WW*S*WW*D*AA;
|
||||
end
|
||||
|
||||
SE_values = sqrt(diag(Asympt_Var));
|
||||
SE_values = sqrt(diag(Asympt_Var));
|
||||
|
|
|
@ -129,7 +129,7 @@ if var_model_order > 1
|
|||
mu = [mu; zeros(lm*var_model_order-lm, 1)];
|
||||
end
|
||||
fprintf(fid, '\n%%%% Calculate %d-step-ahead forecast for VAR(%d) written as VAR(1)\n', max(horizon), var_model_order);
|
||||
fprintf(fid, '%% Follows Lütkepohl (2005) pg 15 & 34\n');
|
||||
fprintf(fid, '%% Follows Lütkepohl (2005) pg 15 & 34\n');
|
||||
if max(horizon) == 1
|
||||
printInsideOfLoop(fid, mu, A, false);
|
||||
fprintf(fid, 'ret(1, :) = y(1:%d);\n', lm);
|
||||
|
@ -179,4 +179,4 @@ fprintf(fid, '%sy = ...\n%s[ ... %% intercept\n%s', fs, spaces, ns);
|
|||
fprintf(fid, ' ] + ...\n%s[ ... %% autoregressive matrices\n%s', spaces, ns);
|
||||
fprintf(fid, [repmat('% f ', 1, size(A, 2)) '; ...\n' ns], A');
|
||||
fprintf(fid, ' ] * y;\n');
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue