DjangoTG / -Monetary-Policy-in-Australia

MIT License
1 stars 3 forks source link

dummy observation prior extension #3

Closed donotdespair closed 1 year ago

donotdespair commented 1 year ago

Hey @DjangoTG

I propose that you implement the dummy observation prior extension to your original model. It's suitable for your work and simple to implement. Also, no one else decided to take this in!

There are two papers to skim for this:

  1. My Bayesian Vector Autoregression paper that is provided for our lectures includes Section 6 which talks about that.
  2. Now, if it's about who to generate these extra observations, then the chapter by Karlsson includes two bullet points on page 806 about Sum of coefficients prior and Dummy initial observations prior. You could implement both. In total, they provide extra N+1 rows to matrices Y and X, where N is the number of variables in your Y.

Have a look at these two sources (a page of reading each) and let's talk about it tomorrow!

Cheers, @donotdespair

donotdespair commented 1 year ago

Hey @DjangoTG

Here is the paper that provides more precise notation for dummy observation prior. It was quite influential at that time.

Greetings, T

DjangoTG commented 1 year ago

Hey!

I've spent the weekend trying to figure out this dummy observation prior extension... It hasn't gone great, I still can't work out what the values of the dummy observations should be. The literature uses so much notation that I haven't seen before so I'm finding it really difficult to work.

For now, I've just set them to zero and created a function to add them to the data, which has yielded better results as far as I can tell.

I'm just uploading the new code to GitHub now so it's there if you want to have a look.

Looking forward to meeting on Monday, did we say 4:30 or 5:30? I can't remember.

Cheers,

Django

On Fri, May 19, 2023 at 9:12 AM Tomasz Woźniak @.***> wrote:

Hey @DjangoTG https://github.com/DjangoTG

Here is the paper that provides more precise notation for dummy observation prior https://onlinelibrary.wiley.com/doi/epdf/10.1002/jae.2315. It was quite influential at that time.

Greetings, T

— Reply to this email directly, view it on GitHub https://github.com/DjangoTG/Macroeconometrics---Initial-Report/issues/3#issuecomment-1554209186, or unsubscribe https://github.com/notifications/unsubscribe-auth/A66HS35D5D5V2IRYCTZNTFLXG4TO3ANCNFSM6AAAAAAYGIUCVI . You are receiving this because you were mentioned.Message ID: @.*** com>

donotdespair commented 1 year ago

Hey @DjangoTG

How about 5 pm? I have sent the calendar invite. Please, do your best to scrutinise this prior or propose a positive way of proceeding with your report.

I'm looking forward to the consultation and looking at your IRFs!

Greetings, @donotdespair

DjangoTG commented 1 year ago

5pm sounds great! I'll see you then!

On Mon, May 22, 2023 at 2:51 AM Tomasz Woźniak @.***> wrote:

Hey @DjangoTG https://github.com/DjangoTG

How about 5 pm? I have sent the calendar invite. Please, do your best to scrutinise this prior or propose a positive way of proceeding with your report.

I'm looking forward to the consultation and looking at your IRFs!

Greetings, @donotdespair https://github.com/donotdespair

— Reply to this email directly, view it on GitHub https://github.com/DjangoTG/Macroeconometrics---Initial-Report/issues/3#issuecomment-1556394842, or unsubscribe https://github.com/notifications/unsubscribe-auth/A66HS3ZYV6XI4MW4RHJ6CE3XHLBCDANCNFSM6AAAAAAYGIUCVI . You are receiving this because you were mentioned.Message ID: @.*** com>

DjangoTG commented 1 year ago

Hi @donotdespair,

I'm getting close to finishing the priors, I'm just having an issue with creating the X dummy initial observation. I'm looking at equation (15) in the paper.

s goes from 1 to M, while j only goes from 1 to N so there are only j values of the y0bar but I need M - 1 values. I'm not sure if that makes sense...

DjangoTG commented 1 year ago

Hi again @donotdespair,

I've updated the GitHub so you can see what I'm talking about more. The function is on lines 375 - 424.

The issue arises on line 418-422 when it creates X.temp (the dummy initial observation prior). I don't know which values should be used for s > N & s <M i.e. X.temp[3:4].

donotdespair commented 1 year ago

Hi @DjangoTG

Hmmm, I can't find any trouble with your code. It seems all fine! I was surprised that you started working with sign restrictions as I thought you would work with a lower triangular system and instead focus on the multi-state setup. The code for the sign restrictions and the impulse response computations and plotting looks fine to me.

Therefore, the only trouble I see is the restrictions you are imposing. So, maybe don't. You have your A and B matrix estimates from the lower-triangular system, so maybe compute the IRFs straight from them?

DjangoTG commented 1 year ago

Hi @donotdespair,

Did you run the code or just read through it? Because on my end it's not rendering or running properly at all, or at least it wasn't last night. I'm about to try again now. I'll take the sign restriction stuff out first though.

Also, we're not meeting at 8:30 are we?

DjangoTG commented 1 year ago

sorry @donotdespair I mean 8:30 my time, so 5:30 your time.

DjangoTG commented 1 year ago

Got your message @donotdespair , all good! See you soon :)

DjangoTG commented 1 year ago

Hi @donotdespair ,

I've added the final commit for the empirical investigation assignment. I'm not super happy with my results though, can discuss more when we meet, but to be brief, I have nothing of statistical significance.

Cheers,

Django