Use secure URL for link to GNU licenses
parent
41320041c3
commit
99aa1fc04b
|
@ -13,4 +13,4 @@ The Dynare particles module is distributed under the GNU GPL:
|
|||
> GNU General Public License for more details.
|
||||
>
|
||||
> You should have received a copy of the GNU General Public License
|
||||
> along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
> along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
@ -45,7 +45,7 @@ function [ ix2, temperedlogpost, loglik, ModelName, MetropolisFolder, npar, Numb
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
%Initialize outputs
|
||||
ix2 = [];
|
||||
|
|
|
@ -52,7 +52,7 @@ function DSMH_sampler(TargetFun,xparam1,mh_bounds,dataset_,dataset_info,options_
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
lambda = exp(bsxfun(@minus,options_.dsmh.H,1:1:options_.dsmh.H)/(options_.dsmh.H-1)*log(options_.dsmh.lambda1));
|
||||
|
|
|
@ -52,7 +52,7 @@ function Herbst_Schorfheide_sampler(TargetFun,xparam1,mh_bounds,dataset_,dataset
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
% Create the tempering schedule
|
||||
|
|
|
@ -46,7 +46,7 @@ function [ ix2, temperedlogpost, loglik, npar, NumberOfParticles, bayestopt_] =
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
%Initialize outputs
|
||||
ix2 = [];
|
||||
|
|
|
@ -17,7 +17,7 @@ function initial_distribution = auxiliary_initialization(ReducedForm,Y,start,Par
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
persistent init_flag mf0 mf1 number_of_particles
|
||||
persistent number_of_observed_variables number_of_structural_innovations
|
||||
|
|
|
@ -18,7 +18,7 @@ function [LIK,lik] = auxiliary_particle_filter(ReducedForm,Y,start,ParticleOptio
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% Set default
|
||||
if isempty(start)
|
||||
|
|
|
@ -37,7 +37,7 @@ function [ProposalStateVector, Weights, flag] = conditional_filter_proposal(Redu
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
flag = false;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ function [LIK,lik] = conditional_particle_filter(ReducedForm, Y, s, ParticleOpti
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% Set default for third input argument.
|
||||
if isempty(s)
|
||||
|
|
|
@ -15,7 +15,7 @@ function [StateMu,StateSqrtP,StateWeights] = fit_gaussian_mixture(X,X_weights,St
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
[dim,Ndata] = size(X);
|
||||
M = size(StateMu,2) ;
|
||||
|
|
|
@ -35,7 +35,7 @@ function IncrementalWeights = gaussian_densities(obs,mut_t,sqr_Pss_t_t,st_t_1,sq
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% proposal density
|
||||
proposal = probability2(mut_t, sqr_Pss_t_t, particles);
|
||||
|
|
|
@ -47,7 +47,7 @@ function [LIK,lik] = gaussian_filter(ReducedForm, Y, start, ParticleOptions, Thr
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% Set default
|
||||
if isempty(start)
|
||||
|
|
|
@ -37,7 +37,7 @@ function [PredictedStateMean, PredictedStateVarianceSquareRoot, StateVectorMean,
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
if ReducedForm.use_k_order_solver
|
||||
dr = ReducedForm.dr;
|
||||
|
|
|
@ -37,7 +37,7 @@ function IncrementalWeights = gaussian_mixture_densities(obs, StateMuPrior, Sta
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% Compute the density of particles under the prior distribution
|
||||
[~, ~, prior] = probability(StateMuPrior, StateSqrtPPrior, StateWeightsPrior, StateParticles);
|
||||
|
|
|
@ -51,7 +51,7 @@ function [LIK, lik] = gaussian_mixture_filter(ReducedForm, Y, start, ParticleOpt
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% Set default
|
||||
if isempty(start)
|
||||
|
|
|
@ -39,7 +39,7 @@ function [StateMuPrior,StateSqrtPPrior,StateWeightsPrior,StateMuPost,StateSqrtPP
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
if ReducedForm.use_k_order_solver
|
||||
dr = ReducedForm.dr;
|
||||
|
|
|
@ -15,7 +15,7 @@ function State_Particles = importance_sampling(StateMuPost,StateSqrtPPost,StateW
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
[Xdim,Gsecond] = size(StateMuPost) ;
|
||||
u = rand(numP,1);
|
||||
|
|
|
@ -15,7 +15,7 @@ function measure = measurement_equations(StateVectors,ReducedForm,ThreadsOptions
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
mf1 = ReducedForm.mf1;
|
||||
if ReducedForm.use_k_order_solver
|
||||
|
|
|
@ -53,7 +53,7 @@ function new_particles = multivariate_smooth_resampling(particles,weights)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% AUTHOR(S) frederic DOT karame AT univ DASH lemans DOT fr
|
||||
% stephane DOT adjemian AT univ DASH lemans DOT fr
|
||||
|
|
|
@ -15,7 +15,7 @@ function [c,SqrtVariance,Weights] = mykmeans(x,g,init,cod)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
[n,m] = size(x) ;
|
||||
indold = zeros(1,m) ;
|
||||
|
|
|
@ -16,6 +16,6 @@ function n = neff(w)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
n = 1/dot(w,w);
|
|
@ -47,7 +47,7 @@ function [LIK,lik] = nonlinear_kalman_filter(ReducedForm, Y, start, ParticleOpti
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% Set default
|
||||
if isempty(start)
|
||||
|
|
|
@ -36,7 +36,7 @@ function [pmean, pmode, pmedian, pstdev, p025, p975, covariance] = online_auxili
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% Set seed for randn().
|
||||
set_dynare_seed('default');
|
||||
|
|
|
@ -15,7 +15,7 @@ function [prior,likelihood,C,posterior] = probability(mu,sqrtP,prior,X)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
[dim,nov] = size(X);
|
||||
M = size(mu,2) ;
|
||||
|
|
|
@ -29,7 +29,7 @@ function [density] = probability2(mu,S,X)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
dim = size(X,1) ;
|
||||
normfact = bsxfun(@power,(2*pi),(dim/2)) ;
|
||||
|
|
|
@ -15,7 +15,7 @@ function [prior,likelihood,C,posterior] = probability3(mu,sqrtP,prior,X,X_weight
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
[dim,nov] = size(X);
|
||||
M = size(mu,2) ;
|
||||
|
|
|
@ -51,7 +51,7 @@ function resampled_output = resample(particles,weights,ParticleOptions)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
defaultmethod = 1; % For residual based method set this variable equal to 0.
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ function return_resample = residual_resampling(particles,weights,noise)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% AUTHOR(S) frederic DOT karame AT univ DASH evry DOT fr
|
||||
% stephane DOT adjemian AT univ DASH lemans DOT fr
|
||||
|
|
|
@ -17,7 +17,7 @@ function [LIK,lik] = sequential_importance_particle_filter(ReducedForm,Y,start,P
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
persistent init_flag
|
||||
persistent mf0 mf1
|
||||
|
|
|
@ -35,7 +35,7 @@ function [info, Model, DynareOptions, DynareResults, ReducedForm] = ...
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
persistent init_flag restrict_variables_idx state_variables_idx mf0 mf1 number_of_state_variables
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ function [nodes,weights] = spherical_radial_sigma_points(n)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
nodes = (sqrt(n)*([eye(n) -eye(n)]))' ;
|
||||
weights = (1/(2*n)) ;
|
||||
|
|
|
@ -48,7 +48,7 @@ function return_resample = traditional_resampling(particles,weights,noise)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% AUTHOR(S) frederic DOT karame AT univ DASH evry DOT fr
|
||||
% stephane DOT adjemian AT univ DASH lemans DOT fr
|
||||
|
|
|
@ -49,7 +49,7 @@ function new_particles = univariate_smooth_resampling(weights,particles,number_o
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
% AUTHOR(S) frederic DOT karame AT univ DASH lemans DOT fr
|
||||
% stephane DOT adjemian AT univ DASH lemans DOT fr
|
||||
|
|
|
@ -29,7 +29,7 @@ function [nodes,W_m,W_c] = unscented_sigma_points(n,ParticleOptions)
|
|||
% 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/>.
|
||||
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
lambda = (ParticleOptions.unscented.alpha^2)*(n+ParticleOptions.unscented.kappa) - n ;
|
||||
nodes = [ zeros(n,1) ( sqrt(n+lambda).*([ eye(n) -eye(n)]) ) ]' ;
|
||||
|
|
Loading…
Reference in New Issue