jmaih / RISE_toolbox

Solution and estimation of Markov Switching Rational Expectations / DSGE Models
BSD 3-Clause "New" or "Revised" License
106 stars 78 forks source link

Option 'data_demean' in estimate(...) #183

Closed UsernameUser100 closed 12 months ago

UsernameUser100 commented 12 months ago

Hello.

I’m in the middle of writing a paper using RSIE toolbox and always check RISE Toolbox Documentation Release 20230709 for reference. I have a question about the code of “4.2.6 Maximizing the posterior” on page 115 of the documentation.

What differences does it make to add 'data_demean' option in estimate(...)?

Do I need to add ‘data_demean' true in estimate(…,'data_demean',true,,‘data’ db, …) after I demean data (such as interest rate and inflation), which is db in estimate(...).

For Example (based on 4.2.5 Collecting and transforming the data on page 114)

d=fetch_fred({'CPALTT01USQ661S','BOGZ1FL072052006Q'}); db=struct(); db.P=log(d(1).series/d(1).series{-1}); db.R=d(2).series/100;

db.P=db.P-mean(db.P) %%% Subtracting the sample mean from data db.R=d(2).series/100-mean(db.P) %%%Subtracting the sample mean from data (In here, I assume that inflation and interest rate are 0 in steady state for simplicity, though I think interest rate is above 0 in the model of page 113.)

then execute the code of ‘4.2.6 Maximizing the posterior’. Is that correct?

Thank you.

jmaih commented 12 months ago

Hi,

The way you treat the data has to be consistent with the implications of your model.

On Mon, Nov 27, 2023, 06:48 UsernameUser100 @.***> wrote:

Hello.

I’m in the middle of writing a paper using RSIE toolbox and always check RISE Toolbox Documentation Release 20230709 for reference. I have a question about the code of “4.2.6 Maximizing the posterior” on page 115 of the documentation.

What differences does it make to add 'data_demean' option in estimate(...)?

Do I need to add ‘data_demean' true in estimate(…,'data_demean',true,,‘data’ db, …) after I demean data (such as interest rate and inflation), which is db in estimate(...).

For Example (based on 4.2.5 Collecting and transforming the data on page 114)

d=fetch_fred({'CPALTT01USQ661S','BOGZ1FL072052006Q'}); db=struct(); db.P=log(d(1).series/d(1).series{-1}); db.R=d(2).series/100;

db.P=db.P-mean(db.P) %%% Subtracting the sample mean from data db.R=d(2).series/100-mean(db.P) %%%Subtracting the sample mean from data (In here, I assume that inflation and interest rate are 0 in steady state for simplicity, though I think interest rate is above 0 in the model of page 113.)

then execute the code of ‘4.2.6 Maximizing the posterior’. Is that correct?

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATKBT77NNWFBKRL7YSNJNLYGQSTBAVCNFSM6AAAAAA73PFQA6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTCNJTGA2TONQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

UsernameUser100 commented 12 months ago

Thank you for the prompt response.