ms-sbvar: made option final_year optional is using the entire sample

time-shift
Michel Juillard 2012-10-24 14:05:11 +02:00
parent c053f227e1
commit 34db22c3bc
2 changed files with 7 additions and 4 deletions

View File

@ -28,9 +28,13 @@ function ms_sbvar_setup(options_)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
check_datafile_years_assigned(options_)
options_.data = read_variables(options_.datafile, ...
options_.varobs, [], options_.xls_sheet, options_.xls_range);
[final_year,final_subperiod] = check_datafile_years_assigned(options_);
if ~isempty(final_year)
options_.ms.final_year = final_year;
opions_.ms.final_subperiod = final_subperiod;
end
if options_.ms.upper_cholesky
if options_.ms.lower_cholesky

View File

@ -982,11 +982,10 @@ MSSBVAREstimationStatement::checkPass(ModFileStructure &mod_file_struct, Warning
if (options_list.num_options.find("ms.create_init") == options_list.num_options.end())
if (options_list.string_options.find("datafile") == options_list.string_options.end() ||
options_list.num_options.find("ms.initial_year") == options_list.num_options.end() ||
options_list.num_options.find("ms.final_year") == options_list.num_options.end())
options_list.num_options.find("ms.initial_year") == options_list.num_options.end())
{
cerr << "ERROR: If you do not pass no_create_init to ms_estimation, "
<< "you must pass the datafile, initial_year and end_year options." << endl;
<< "you must pass the datafile and initial_year options." << endl;
exit(EXIT_FAILURE);
}
}