Fixed indentation.
parent
823d947484
commit
4921000f0a
|
@ -87,7 +87,7 @@ yhat = bsxfun(@minus,StateVectors,state_variables_steady_state);
|
|||
% yhat_ = bsxfun(@minus,StateVectors_,state_variables_steady_state);
|
||||
% [tmp, tmp_] = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,yhat_,steadystate,ThreadsOptions.local_state_space_iteration_2);
|
||||
%else
|
||||
tmp = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,ThreadsOptions.local_state_space_iteration_2);
|
||||
tmp = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,ThreadsOptions.local_state_space_iteration_2);
|
||||
%end
|
||||
PredictedObservedMean = weights*(tmp(mf1,:)');
|
||||
PredictionError = bsxfun(@minus,Y(:,t),tmp(mf1,:));
|
||||
|
|
|
@ -49,4 +49,3 @@ for n=1:niters
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -54,4 +54,3 @@ sqr_det = sqrt(det(Pyy)) ;
|
|||
foo = (eta_t_i/Pyy).*eta_t_i ;
|
||||
likelihood = exp(-0.5*sum(foo,2))/(normconst*sqr_det) + 1e-99 ;
|
||||
IncrementalWeights = likelihood.*prior./proposal ;
|
||||
|
||||
|
|
|
@ -26,4 +26,3 @@ for k=1:Gsecond
|
|||
State_Particles(:,idx) = StateSqrtPPost(:,:,k)*randn(Xdim,Nc(k));
|
||||
end
|
||||
State_Particles= State_Particles + StateMuPost(:,comp);
|
||||
|
||||
|
|
|
@ -28,6 +28,3 @@ state_variables_steady_state = ReducedForm.state_variables_steady_state;
|
|||
number_of_structural_innovations = length(ReducedForm.Q);
|
||||
yhat = bsxfun(@minus,StateVectors,state_variables_steady_state) ;
|
||||
measure = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,size(yhat,2)),ghx,ghu,constant,ghxx,ghuu,ghxu,ThreadsOptions.local_state_space_iteration_2);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -367,4 +367,3 @@ for plt = 1:nbplt,
|
|||
fprintf(fidTeX,' \n');
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -185,18 +185,18 @@ if EstimatedParameters.ncx
|
|||
Q(k2,k1) = Q(k1,k2);
|
||||
end
|
||||
% Try to compute the cholesky decomposition of Q (possible iff Q is positive definite)
|
||||
% [CholQ,testQ] = chol(Q);
|
||||
% if testQ
|
||||
% [CholQ,testQ] = chol(Q);
|
||||
% if testQ
|
||||
% The variance-covariance matrix of the structural innovations is not definite positive. We have to compute the eigenvalues of this matrix in order to build the endogenous penalty.
|
||||
% a = diag(eig(Q));
|
||||
% k = find(a < 0);
|
||||
% if k > 0
|
||||
% fval = objective_function_penalty_base+sum(-a(k));
|
||||
% exit_flag = 0;
|
||||
% info = 43;
|
||||
% return
|
||||
% end
|
||||
% end
|
||||
% a = diag(eig(Q));
|
||||
% k = find(a < 0);
|
||||
% if k > 0
|
||||
% fval = objective_function_penalty_base+sum(-a(k));
|
||||
% exit_flag = 0;
|
||||
% info = 43;
|
||||
% return
|
||||
% end
|
||||
% end
|
||||
offset = offset+EstimatedParameters.ncx;
|
||||
end
|
||||
|
||||
|
@ -210,18 +210,18 @@ if EstimatedParameters.ncn
|
|||
H(k2,k1) = H(k1,k2);
|
||||
end
|
||||
% Try to compute the cholesky decomposition of H (possible iff H is positive definite)
|
||||
% [CholH,testH] = chol(H);
|
||||
% if testH
|
||||
% [CholH,testH] = chol(H);
|
||||
% if testH
|
||||
% The variance-covariance matrix of the measurement errors is not definite positive. We have to compute the eigenvalues of this matrix in order to build the endogenous penalty.
|
||||
% a = diag(eig(H));
|
||||
% k = find(a < 0);
|
||||
% if k > 0
|
||||
% fval = objective_function_penalty_base+sum(-a(k));
|
||||
% exit_flag = 0;
|
||||
% info = 44;
|
||||
% return
|
||||
% end
|
||||
% end
|
||||
% a = diag(eig(H));
|
||||
% k = find(a < 0);
|
||||
% if k > 0
|
||||
% fval = objective_function_penalty_base+sum(-a(k));
|
||||
% exit_flag = 0;
|
||||
% info = 44;
|
||||
% return
|
||||
% end
|
||||
% end
|
||||
offset = offset+EstimatedParameters.ncn;
|
||||
end
|
||||
|
||||
|
|
|
@ -38,5 +38,3 @@ W_c = W_m + (1-ParticleOptions.unscented.alpha^2+ParticleOptions.unscented.beta)
|
|||
temp = ones(2*n,1)/(2*(n+lambda)) ;
|
||||
W_m = [W_m ; temp] ;
|
||||
W_c = [W_c ; temp] ;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue