Commit bd00dc11 authored by MichelJuillard's avatar MichelJuillard

removing 8th output argument of dynare_estimation_init and

corresponding seemingly useless code
parent 88be4fa3
...@@ -37,7 +37,7 @@ else ...@@ -37,7 +37,7 @@ else
objective_function = str2func('DsgeVarLikelihood'); objective_function = str2func('DsgeVarLikelihood');
end end
[dataset_,xparam1, M_, options_, oo_, estim_params_,bayestopt_, fake] = dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_); [dataset_,xparam1, M_, options_, oo_, estim_params_,bayestopt_] = dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_);
data = dataset_.data; data = dataset_.data;
rawdata = dataset_.rawdata; rawdata = dataset_.rawdata;
......
...@@ -308,81 +308,3 @@ end ...@@ -308,81 +308,3 @@ end
dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls); dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);
options_.nobs = dataset_.info.ntobs; options_.nobs = dataset_.info.ntobs;
% $$$ rawdata = read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);
% $$$ % Set the number of observations (nobs) and build a subsample between first_obs and nobs.
% $$$ options_ = set_default_option(options_,'nobs',size(rawdata,1)-options_.first_obs+1);
% $$$ gend = options_.nobs;
% $$$ rawdata = rawdata(options_.first_obs:options_.first_obs+gend-1,:);
% $$$ % Take the log of the variables if needed
% $$$ if options_.loglinear % If the model is log-linearized...
% $$$ if ~options_.logdata % and if the data are not in logs, then...
% $$$ rawdata = log(rawdata);
% $$$ end
% $$$ end
% $$$ % Test if the observations are real numbers.
% $$$ if ~isreal(rawdata)
% $$$ error('There are complex values in the data! Probably a wrong transformation')
% $$$ end
% $$$ % Test for missing observations.
% $$$ options_.missing_data = any(any(isnan(rawdata)));
% $$$ % Prefilter the data if needed.
% $$$ if options_.prefilter == 1
% $$$ if options_.missing_data
% $$$ bayestopt_.mean_varobs = zeros(n_varobs,1);
% $$$ for variable=1:n_varobs
% $$$ rdx = find(~isnan(rawdata(:,variable)));
% $$$ m = mean(rawdata(rdx,variable));
% $$$ rawdata(rdx,variable) = rawdata(rdx,variable)-m;
% $$$ bayestopt_.mean_varobs(variable) = m;
% $$$ end
% $$$ else
% $$$ bayestopt_.mean_varobs = mean(rawdata,1)';
% $$$ rawdata = rawdata-repmat(bayestopt_.mean_varobs',gend,1);
% $$$ end
% $$$ end
% $$$ % Transpose the dataset array.
% $$$ data = transpose(rawdata);
if nargout>7
% Compute the steady state:
if options_.steadystate_flag% if the *_steadystate.m file is provided.
[ys,tchek] = feval([M_.fname '_steadystate'],...
[zeros(M_.exo_nbr,1);...
oo_.exo_det_steady_state]);
if size(ys,1) < M_.endo_nbr
if length(M_.aux_vars) > 0
ys = add_auxiliary_variables_to_steadystate(ys,M_.aux_vars,...
M_.fname,...
zeros(M_.exo_nbr,1),...
oo_.exo_det_steady_state,...
M_.params,...
options_.bytecode);
else
error([M_.fname '_steadystate.m doesn''t match the model']);
end
end
oo_.steady_state = ys;
else% if the steady state file is not provided.
[dd,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
oo_.steady_state = dd.ys; clear('dd');
end
if all(abs(oo_.steady_state(bayestopt_.mfys))<1e-9)
options_.noconstant = 1;
else
options_.noconstant = 0;
end
fake = [];
% $$$ [data_index,number_of_observations,no_more_missing_observations] = describe_missing_data(data,gend,n_varobs);
% $$$ missing_value = ~(number_of_observations == gend*n_varobs);
% $$$
% $$$ % initial_estimation_checks(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);
% $$$
% $$$ data_info.gend = gend;
% $$$ data_info.data = data;
% $$$ data_info.data_index = data_index;
% $$$ data_info.number_of_observations = number_of_observations;
% $$$ data_info.no_more_missing_observations = no_more_missing_observations;
% $$$ data_info.missing_value = missing_value;
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment