Jake:

As I said before, I'd like you to put all your time into the ms-sbvar project.  No other duties, but only this project.  It has been taking too long a time.

Let me know how much you plan to accomplish in the next couple of weeks.

Tao


On Feb 19, 2011, at 5:13 AM, Michel Juillard wrote:

Hi Jake,
I know that you all are busy with the new release, but I wanted to try and keep things moving on the ms-sbvar code.

Excellent!
I wanted to make a suggestion on the pre_processor inputs to handle some of the new functionality that we wanted to be have in ms_sbvar.

1.) Instead of having "estimate_model" could this be changed to  "mode_file=FILENAME" similar to the estimation command for dsge models?

It needs to be coupled with mode_compute=0, even if there are not alternative algorithms for computing mode for MS SBVAR models

2.) To have a user be able to load previous simulations could they specify "load_mh_file"
Yes

3.) For the Impulse Response Functions, should the user specify "irf=INTEGER" or "bayesian_irf"

irf=INTEGER specifies the length of the IRF (in solving/simulation and in estimation)
bayesian_irf requests the posterior distribution of the IRFs (in estimation)

so in estimation context, both options may be used


4.) Should "optim=()" be added for the user to be able to adjust csminwel options (maximum block iterations, convergence increment value, etc.)

optim=() was designed a long time ago to pass optimization options for Matlab's fmincon(). It has the advantage of passing option names that are not known from the preprocessor.

It would certainly be desirable to let the user specify options for csminwel.

I'm a bit hesitant about just passing arbitrary option names as in in optim=() or putting in the preprocessor the list of options for each optimizer known to Dynare that can be changed by the user. What do you think?

5.) The simulation options can be simplified to work with Dan's new code: 

n_draws=INTEGER (draws to save) Should this be changed to mh_replic= ?
yes
burnin=INTEGER
we use drop=INTEGER
thinning_factor=INTEGER
what exactly does thinning_factor?
mh=INTEGER (Tuning period for adaptive MH), perhaps another name 'adaptive_mh_draws'?
adaptive_mh_draws is OK by me

We should probably also use adaptive_mh_draws in DSGE estimation


(thin*n_draws+burnin = total number of draws)

The current options in the preprocessor that relate to simulation options:

n_draws
thinning_factor
proposal_draws
draws_nbr_burn_in_1
draws_nbr_burn_in_2
draws_nbr_mean_var_estimate
draws_nbr_modified_harmonic_mean
dirichlet_scale



All the best,

Michel

Jacob Smith
Quantitative Research Analysis Specialist
Federal Reserve Bank of Atlanta
1000 Peachtree St NE
Atlanta, GA 30309-4470
Phone: 404.498.8093
Email: Jacob.Smith@atl.frb.org

On Feb 16, 2011, at 5:20 AM, Sébastien Villemot wrote:

Hi Jake,

I didn’t merge your changes. To achieve your goal, you don’t need to
introduce a new "vec_float" rule and all the associated logic (by the way,
we should not use floats but doubles).

A very easy way to achieve the same goal is to use "vec_value" in the
Bison file. It is already used by "o_gsa_threshold_redform" option, and
I think it does what you need. The strings are never converted to
doubles, but we don’t need to have them converted: we just pass them
over to MATLAB.

Please update your changes (which should now become very minimal).
Sorry for the inconvenience.

Best,

Jacob Smith <jacob.smith@atl.frb.org> writes:

Hi Michel,

These changes have been pushed.

Jacob Smith
Quantitative Research Analysis Specialist
Federal Reserve Bank of Atlanta
1000 Peachtree St NE
Atlanta, GA 30309-4470
Phone: 404.498.8093
Email: Jacob.Smith@atl.frb.org

On Feb 13, 2011, at 12:41 PM, Michel Juillard wrote:

   Hi Jake,

   thanks. I understand now. I looked at your last changes pushed to dynare-jake.git
   1) your changes to ParsingDriver.cc (+hh) remove void ParsingDriver::add_steady_state_model_equal_multiple() at the very end of the file. I don't understand the change
   2) There is also a change to spaces in add_expectation()
   3) I prefer the longer option name "coefficients_prior_hyperparameters" to the more cryptic "sz_prior"

   Could you please modify your last change and push it again?

   All the best

   Michel

   On 02/11/2011 10:11 PM, Jacob Smith wrote:

       Hi Michel,

       My apologies for the confusion in my last email, my addition was to the ms_sbvar options list, so that the user just adds an option if they want to change the hyper
       parameters that relate to the Sims/Zha prior. I have pushed these changes to the repository.

       To use Stephane's example on how you would modify the hyper-parameters of the ms_sbvar model you would do the following:

       ms_sbvar(datafile = data_59Q2_05Q4,
             freq=4,
             initial_year=1959,
             final_year=2005,
             initial_subperiod=2,
             final_subperiod=4,
             nlags=4,
             draws_nbr_modified_harmonic_mean=100,
             sz_prior=[1.2,2.1,1.2,2.1,1.2,2.1]
             );

       The default has been set to sz_prior = [1.0 1.0 0.1 1.2 1.0 1.0], in the global_initialization.m file.

       Currently there are some bugs in the repository though that have been introduced by the directories being renamed. I have not wanted to step on anyone's changes so I
       haven't made a commit to fix the problems with the subdirectories (identification,etc.) in ms-sbvar not being loaded into the user's path.

       I will be happy to make any modifications that you need if this is not what you would prefer as it relates to how you specify these hyper-parameters.

       Jacob Smith
       Quantitative Research Analysis Specialist
       Federal Reserve Bank of Atlanta
       1000 Peachtree St NE
       Atlanta, GA 30309-4470
       Phone: 404.498.8093
       Email: Jacob.Smith@atl.frb.org

       On Feb 11, 2011, at 3:15 PM, Michel Juillard wrote:

           Hi Jake,

           currently, in Dynare, the main entry point is

           swz_sbvar(ms_flag, M, options)

           whith

           ms_flag = 1: Markov Switching; =2: simple SBVAR
           M: parameters from the *.mod file (probably the only one that one needs is M.fname)
           options: all options

           1) we should rename swz_sbvar() to ms_sbvar() and make other changes required by the renaming of the directory
           2) your example seems to have only a small list of options, how do you pass the other ones that are listed on the wiki?

           All the best,

           Michel

           On 02/11/2011 04:01 PM, Jacob Smith wrote:

               Hi Stephane,

               I have added this capability to the version I was working on with other changes for the new code from Dan. Currently I had named the option  'sz_prior' but could
               easily change it to the name you suggest Michel. It allows the user to to specify a vector of 6 floats, like so:

               ms_sbvar(datafile = data,
               freq=4,initial_year=1959,
               final_year=2005,
               nlags=5,
               draws_nbr_modified_harmonic_mean=10000,
               sz_prior=[1.2,1.1,1.2,1.1,1.2,1.1]);

               I will be happy to push the changes to the preprocessor along with the changes to some Matlab files to use these options to the Dynare repository.

               Jacob Smith
               Quantitative Research Analysis Specialist
               Federal Reserve Bank of Atlanta
               1000 Peachtree St NE
               Atlanta, GA 30309-4470
               Phone: 404.498.8093
               Email: Jacob.Smith@atl.frb.org

               On Feb 11, 2011, at 7:32 AM, Michel Juillard wrote:

                   Hi Stephane,

                   thanks for reporting the problem. I think that we should do both as we have only suggested priors for monthly and quarterly. The code should fail and ask the
                   user to set his/her own values for the mu's when the frequency is not monthly or quarterly.
                   I suggest to call the option "coefficients_prior_hyperparameters" and require the user to supply a vector of 6 real numbers.

                   Please, always include houtan.bastani@ens.fr in the messages relative to this project.

                   Best

                   Michel

                   On 2/11/2011 1:20 PM, T. Zha wrote:

                       Jake:

                       Please investigate the following problem.

                       Thank you.

                       Tao

                       ---------
                       On Feb 11, 2011, at 5:35 AM, <Stephane.LHUISSIER@banque-france.fr> <Stephane.LHUISSIER@banque-france.fr> wrote:

                       Dear Michel and Tao,

                       The dynare interface does not let the user to change the prior specification on SBVAR coefficients. In the file “msstart_setup” (from line 112), you can see
                       that the priors (mu) are defined for monthly data. If the user wants to use quarterly data, he has to change the values of mu_i directly on this file.
                       In order to improve this, I think that two solutions are possible :
                       1)      Adding an interface in dynare for defining its own values.
                       2)      Following Sims and Zha (1998) ‘s suggestions and in this case, here is an example :

                       % === The following mu is effective only if options_.ms.bayesian_prior==1.
                       if (options_.ms.freq==12)
                       mu = zeros(6,1);   % hyperparameters
                       mu(1) = 0.57;
                       mu(2) = 0.13;
                       mu(3) = 0.1;
                       mu(4) = 1.5;
                       mu(5) = 5;
                       mu(6) = 5;
                       elseif (options_.ms.freq==4)
                       mu = zeros(6,1);   % hyperparameters
                       mu(1) = 1;
                       mu(2) = 1;
                       mu(3) = 0.1;
                       mu(4) = 1;
                       mu(5) = 1;
                       mu(6) = 1;
                       else
                          disp('Warning: this code is only good for monthly/quarterly data!!!')
                          return
                       end

                       Stéphane

                       **************************************************************
                       Ce mel est a l'attention exclusive des destinataires designes.
                       Il peut contenir des informations confidentielles.
                       Si vous le recevez par erreur, merci d'en informer sans delai l'expediteur.

                       Le contenu de ce mel ne pourrait engager la responsabilite de la Banque de France
                       que s'il a ete emis par une personne dument habilitee agissant dans le strict
                       cadre des fonctions auxquelles elle est employee et a des fins non etrangeres a ses attributions.
                       **************************************************************


--
Sébastien Villemot
CEPREMAP - Paris School of Economics
Homepage: http://www.dynare.org/sebastien
Landline phone: +33 1 40 77 49 90
SIP phone: sebastien.villemot@ekiga.net
PGP Key: 0xA6C029B9D06B2913D71C105EBE37E801FB6EFF8B (http://pgp.mit.edu/)


_______________________________________________
Dev mailing list
Dev@dynare.org
https://www.dynare.org/cgi-bin/mailman/listinfo/dev