Merge remote-tracking branch 'houtanb/master'

time-shift
Sébastien Villemot 2011-10-12 17:47:18 +02:00
commit 99da257ec3
38 changed files with 149 additions and 46 deletions

View File

@ -66,17 +66,15 @@ case ${MATLAB_ARCH} in
MACOSX_DEPLOYMENT_TARGET='10.6'
if test "${MATLAB_ARCH}" = "maci"; then
ARCHS='i386'
MATLAB_FFLAGS=''
else
ARCHS='x86_64'
MATLAB_FFLAGS='-m64'
fi
MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG"
MATLAB_CFLAGS="-fno-common -no-cpp-precomp -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -fexceptions -O2"
MATLAB_LDFLAGS="-L$MATLAB/bin/${MATLAB_ARCH} -Wl,-twolevel_namespace -undefined error -arch $ARCHS -Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle -Wl,-exported_symbols_list,\$(top_srcdir)/mexFunction-MacOSX.map"
MATLAB_LIBS="-lmx -lmex -lmat -lstdc++ -lmwlapack"
MATLAB_CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch $ARCHS -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -O2"
MATLAB_FFLAGS="-fexceptions $MATLAB_FFLAGS -fbackslash"
MATLAB_FFLAGS="-fexceptions -fbackslash -arch $ARCHS"
# Starting from MATLAB 7.5, BLAS and LAPACK are in distinct libraries
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.5], [MATLAB_LIBS="${MATLAB_LIBS} -lmwblas"])
ax_mexopts_ok="yes"

View File

@ -1,5 +1,5 @@
function clean_files_for_second_type_of_mex(M_, options_, type)
%function clean_files_for_second_type_of_mex()
% function clean_files_for_second_type_of_mex(M_, options_, type)
% clean the files for the appropriate file tag and mex function
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_estimation_files(file_tag)
% function clean_ms_estimation_files()
% function clean_ms_estimation_files(file_tag)
% removes MS estimation files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_forecast_files(file_tag)
% function clean_ms_forecast_files()
% function clean_ms_forecast_files(file_tag)
% removes MS forecast files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_init_files(file_tag)
% function clean_ms_init_files()
% function clean_ms_init_files(file_tag)
% removes MS initialization files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_irf_files(file_tag)
% function clean_ms_irf_files()
% function clean_ms_irf_files(file_tag)
% removes MS irf files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_mdd_files(file_tag, pt)
% function clean_ms_mdd_files()
% function clean_ms_mdd_files(file_tag, pt)
% removes MS mdd files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_probabilities_files(file_tag)
% function clean_ms_probabilities_files()
% function clean_ms_probabilities_files(file_tag)
% removes MS probabilities files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_simulation_files(file_tag)
% function clean_ms_simulation_files()
% function clean_ms_simulation_files(file_tag)
% removes MS simulation files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_ms_variance_decomposition_files(file_tag)
% function clean_ms_variance_decomposition_files()
% function clean_ms_variance_decomposition_files(file_tag)
% removes MS variance decomposition files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function clean_sbvar_files()
%function clean_sbvar_files()
% function clean_sbvar_files()
% Remove files created by sbvar
%
% INPUTS

View File

@ -1,5 +1,5 @@
function create_dir(dirname)
% function create_dir()
% function create_dir(dirname)
% creates directory if it doesn't exist
%
% INPUTS

View File

@ -1,5 +1,5 @@
function delete_dir_if_exists(dirname)
% function delete_dir_if_exists()
% function delete_dir_if_exists(dirname)
% removes directory if it exists
%
% INPUTS

View File

@ -1,5 +1,5 @@
function delete_if_exists(fname)
% function delete_if_exists()
% function delete_if_exists(fname)
% removes MS intermediary files
%
% INPUTS

View File

@ -1,5 +1,5 @@
function dyn_save_graph(dirname,graph_name,graph_formats,TeX,names,texnames,caption)
% function dyn_graph_save(graph_name,graph_formats,TeX)
% function dyn_save_graph(dirname,graph_name,graph_formats,TeX,names,texnames,caption)
% saves Dynare graphs
%
% INPUTS

View File

@ -1,5 +1,5 @@
function options_=initialize_ms_sbvar_options(M_, options_)
%function initialize_ms_sbvar_options()
% function options_=initialize_ms_sbvar_options(M_, options_)
% sets ms sbvar options back to their default values
%
% INPUTS

View File

@ -1,6 +1,6 @@
function [options_, oo_]=ms_compute_mdd(M_, options_, oo_)
%function ms_compute_mdd()
% MS Sbvar Compute Marginal Data Density
% function [options_, oo_]=ms_compute_mdd(M_, options_, oo_)
% Markov-switching SBVAR: Compute Marginal Data Density
%
% INPUTS
% M_: (struct) model structure

View File

@ -1,6 +1,6 @@
function [options_, oo_]=ms_compute_probabilities(M_, options_, oo_)
%function ms_simulation()
% MS Sbvar Compute Posterior Mode Regime Probabilities
% function [options_, oo_]=ms_compute_probabilities(M_, options_, oo_)
% Markov-switching SBVAR: Compute Posterior Mode Regime Probabilities
%
% INPUTS
% M_: (struct) model structure

View File

@ -1,6 +1,6 @@
function [options_, oo_]=ms_estimation(M_, options_, oo_)
%function ms_estimation()
% MS Sbvar Estimation
% function [options_, oo_]=ms_estimation(M_, options_, oo_)
% Markov-switching SBVAR: Estimation
%
% INPUTS
% M_: (struct) model structure

View File

@ -1,6 +1,6 @@
function [options_, oo_]=ms_forecast(M_, options_, oo_)
%function ms_forecast()
% MS-SBVAR Forecast
% function [options_, oo_]=ms_forecast(M_, options_, oo_)
% Markov-switching SBVAR: Forecast
%
% INPUTS
% M_: (struct) model structure

View File

@ -1,6 +1,6 @@
function [options_, oo_]=ms_irf(varlist,M_, options_, oo_)
%function ms_irf()
% MS-SBVAR Impulse Response Function
function [options_, oo_]=ms_irf(varlist, M_, options_, oo_)
% function [options_, oo_]=ms_irf(varlist, M_, options_, oo_)
% Markov-switching SBVAR: Impulse Response Function
%
% INPUTS
% varlist: (chararray) list of selected endogenous variables

View File

@ -6,6 +6,23 @@ function ms_mardd(options_)
%
% Tao Zha, September 1999. Quick revisions, May 2003. Final revision, September 2004.
% Copyright (C) 2011 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% 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/>.
msstart2 % start the program in which everyhting is initialized through msstart2.m
if ~options_.ms.indxestima
warning(' ')

View File

@ -1,5 +1,5 @@
function ms_sbvar_setup(options_)
%function ms_sbvar_setup()
% function ms_sbvar_setup(options_)
% does the general file initialization for ms sbvar
%
% INPUTS

View File

@ -1,6 +1,6 @@
function [options_, oo_]=ms_simulation(M_, options_, oo_)
%function ms_simulation()
% MS Sbvar Simulation
% function [options_, oo_]=ms_simulation(M_, options_, oo_)
% Markov-switching SBVAR: Simulation
%
% INPUTS
% M_: (struct) model structure

View File

@ -1,6 +1,6 @@
function [options_, oo_]=ms_variance_decomposition(M_, options_, oo_)
%function ms_variance_decomposition()
% MS-SBVAR Variance Decomposition
% function [options_, oo_]=ms_variance_decomposition(M_, options_, oo_)
% Markov-switching SBVAR: Variance Decomposition
%
% INPUTS
% M_: (struct) model structure

View File

@ -1,4 +1,31 @@
function ms_write_markov_file(fname,options)
function ms_write_markov_file(fname, options)
% function ms_write_markov_file(fname, options)
%
% INPUTS
% fname: (string) name of markov file
% options: (struct) options
%
% OUTPUTS
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2011 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% 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/>.
n_chains = length(options.ms.ms_chain);
nvars = size(options.varobs,1);

View File

@ -1,4 +1,32 @@
function ms_write_mhm_input(fname,options_ms)
function ms_write_mhm_input(fname, options_ms)
% function ms_write_mhm_input(fname, options_ms)
%
% INPUTS
% fname: (string) filename
% options_ms: (struct) options
%
% OUTPUTS
% none
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2011 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% 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/>.
fh = fopen(fname,'w');

View File

@ -12,6 +12,23 @@
%
% February 2004
% Copyright (C) 2011 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% 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/>.
% ** ONLY UNDER UNIX SYSTEM
%path(path,'/usr2/f1taz14/mymatlab')

View File

@ -1,5 +1,22 @@
%function []= msstart_setup(options_)
% Copyright (C) 2011 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% 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/>.
% ** ONLY UNDER UNIX SYSTEM
%path(path,'/usr2/f1taz14/mymatlab')

View File

@ -1,5 +1,5 @@
function plot_ms_forecast(M_,options_,forecast,title_,save_graph_formats,TeX)
% function [] = plot_ms_forecast(forecast,names)
% function plot_ms_forecast(M_,options_,forecast,title_,save_graph_formats,TeX)
% plots the forecast from the output from a ms-sbvar
%
% INPUTS

View File

@ -1,5 +1,5 @@
function plot_ms_irf(M_, options_, irf, names, title_, varlist)
% function [] = plot_ms_irf(irf,names)
% function plot_ms_irf(M_, options_, irf, names, title_, varlist)
% plots the impulse responses from the output from a ms-sbvar
%
% INPUTS

View File

@ -1,5 +1,5 @@
function plot_ms_probabilities(computed_probabilities, options_)
% function plot_ms_probabilities(computed_probabilities)
% function plot_ms_probabilities(computed_probabilities, options_)
% Plots the regime probablities for each graph
%
% INPUTS

View File

@ -1,5 +1,5 @@
function plot_ms_variance_decomposition(M_, options_, vd, title_, graph_save_formats, ...
TeX, varargin)
function plot_ms_variance_decomposition(M_, options_, vd, title_, graph_save_formats, TeX, varargin)
% function plot_ms_variance_decomposition(M_, options_, vd, title_, graph_save_formats, TeX, varargin)
% plot the variance decomposition of shocks
%
% Inputs

View File

@ -1,5 +1,5 @@
function [options_]=set_file_tags(options_)
%function set_file_tags()
% function [options_]=set_file_tags(options_)
% Sets the appropriate file tags for first type of mex function
%
% INPUTS

View File

@ -1,5 +1,5 @@
function [options_, oo_]=set_ms_estimation_file(file_tag, options_, oo_)
%function set_ms_estimation_file()
% function [options_, oo_]=set_ms_estimation_file(file_tag, options_, oo_)
% Set options_.ms.free_param_file based on user input
%
% INPUTS

View File

@ -1,5 +1,5 @@
function options_=set_ms_simulation_file(options_)
%function set_ms_simulation_file()
% function options_=set_ms_simulation_file(options_)
% Set options_.ms.mh_file based on user input
%
% INPUTS

View File

@ -161,7 +161,7 @@ class ParsingDriver;
%token SELECTED_VARIABLES_ONLY COVA_COMPUTE SIMULATION_FILE_TAG FILE_TAG
%token NO_ERROR_BANDS ERROR_BAND_PERCENTILES SHOCKS_PER_PARAMETER NO_CREATE_INIT
%token SHOCK_DRAWS FREE_PARAMETERS MEDIAN DATA_OBS_NBR NEIGHBORHOOD_WIDTH PVALUE_KS PVALUE_CORR
%token FILTERED_PROBABILITIES FILTERED REAL_TIME_SMOOTHED
%token FILTERED_PROBABILITIES REAL_TIME_SMOOTHED
%token PROPOSAL_TYPE PROPOSAL_UPPER_BOUND PROPOSAL_LOWER_BOUND PROPOSAL_DRAWS USE_MEAN_CENTER
%token ADAPTIVE_MH_DRAWS THINNING_FACTOR COEFFICIENTS_PRIOR_HYPERPARAMETERS
%token CONVERGENCE_STARTING_VALUE CONVERGENCE_ENDING_VALUE CONVERGENCE_INCREMENT_VALUE

View File

@ -326,7 +326,6 @@ string eofbuff;
<DYNARE_STATEMENT>file_tag {return token::FILE_TAG;};
<DYNARE_STATEMENT>no_create_init {return token::NO_CREATE_INIT;};
<DYNARE_STATEMENT>simulation_file_tag {return token::SIMULATION_FILE_TAG;};
<DYNARE_STATEMENT>filtered {return token::FILTERED;}
<DYNARE_STATEMENT>horizon {return token::HORIZON;}
<DYNARE_STATEMENT>no_error_bands {return token::NO_ERROR_BANDS;}
<DYNARE_STATEMENT>error_band_percentiles {return token::ERROR_BAND_PERCENTILES;}