Erreur de compilation

Now you have measurement equations outside of the model block and did not define these objects as variables.

how to declare them?
give me an example that rhymes with my work I take as varobs tau_c and tau_l

hello Professor how are you?

What do you mean with giving an example? Your mod-file had undeclared variables (not declared after var) and equations put where they do not belong (outside of the model-block).

if you don’t mind, can you modify my mod file by declaring the equations placed where they don’t belong so that it can be adapted to my modeling?

salim.mod (11.2 KB)

So far I’m getting the same errors with the last mod file you sent me. I wonder if the problem isn’t with my matlab because I’m using R2022b and dynare 5.3?

Why error are you getting?

I don’t know it too
I always get the same message:
Error using load_m_file_data_legacy
Some variables are missing (tau_c_obs tau_l_obs)!

Error in makedataset (line 126)
DynareDataset = load_m_file_data_legacy(datafile, DynareOptions.varobs);

Error in dynare_estimation_init (line 553)
[dataset_, dataset_info, newdatainterfaceflag] = makedataset(options_, options_.dsge_var*options_.dsge_varlag, gsa_flag);

Error in dynare_estimation_1 (line 110)
dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_);

Error in dynare_estimation (line 118)

Error in saldsge.driver (line 528)

Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);

I worked a bit on the git and added the measurement equations in my model
this is the message I get:
Starting Dynare (version 5.3).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
ERROR: saldsge.mod: line 214, cols 1-6: syntax error, unexpected VAROBS

Error using dynare
Dynare: preprocessing failed

Again, you did not even add data for these variables to your dataset. We are running in circles. It seems you do not have the proper training to embark on the estimation of DSGE models. It’s the advisor’s job to assist you.

i am doing a self study reason why i took inspiration from several codes to calibrate my DSGE model. reason why i really appreciate your support and help you make me become better in my application. if you don’t mind once again try to add data for these variables i think this is the last step to turn my model. I have never received any training or a course regarding the DSGE model and matlab let alone, you are and will be my only guide once again I thank you. and believe me my paper will be for your magazine you have helped me so much, and if you don’t mind I will put your name in the paper.

thank you from the bottom of my heart

I don’t understand the problem. You told the estimation routine that you are observing data on the respective tax rates of the economy. But you seem to not actually have any data on these variables. Why do you even proceed in this way?

see for yourself my procedure.
I will send you my last git and excel sheet and what matlab shows me:

Capture d’écran 2023-03-21 215558

salim.mod (11.1 KB)
sms.xlsx (12.6 KB)

here is the git and excel file i give up the tau_c_obs and tau_l_obs.

excuse me again now you can correct the error I am 100% confident

It’s the third time you deleted the xls_range.

please try to add when I had run the process with xls_range I always received the error message. Is my git properly coded?

Hello Professor,
there are several ways to generate a database on matlab, I have declared the variables, here is the message I receive I have the check plot mode and the priorsdoes not show the standard deviation (the green dots) :

You need to investigate the mode_check-plots. But this is not surprising, given that your observation equations are wrong, because you are matching trending data to stationary variables in the model.

agree and how to correct?

Please refer to Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”