Historical Decomposition
-
AhmedSahlool
- Posts: 78
- Joined: Tue Jul 05, 2011 5:57 am
Historical Decomposition
Dear Tom,
I hope this finds you well,
I would like to know why the sum of components resulting from historical decomposition, within gibbs sampling, does not sum to the actual observed value?
is it the result of skewed distribution, I average the resulting components using this loop:
Do i = 1,(nvar+1)
Do j=1,nvar
Set History(i,j) hstart hend = History(i,j)/ndraws
End do j
End do i
Do you recommend the median to get closer to the actual observation?
Would you kindly indicate how to implement it, as i tried many ways and I can not apply it.
Thank you and best regards
I hope this finds you well,
I would like to know why the sum of components resulting from historical decomposition, within gibbs sampling, does not sum to the actual observed value?
is it the result of skewed distribution, I average the resulting components using this loop:
Do i = 1,(nvar+1)
Do j=1,nvar
Set History(i,j) hstart hend = History(i,j)/ndraws
End do j
End do i
Do you recommend the median to get closer to the actual observation?
Would you kindly indicate how to implement it, as i tried many ways and I can not apply it.
Thank you and best regards
Re: Historical Decomposition
The historical decomposition only reproduces the original data if the residuals are recomputed for new coefficients. That's covered in Chapter 4 of the VAR Workbook.
The medians of the decompositions won't necessarily add up. The means will.
The medians of the decompositions won't necessarily add up. The means will.
-
AhmedSahlool
- Posts: 78
- Joined: Tue Jul 05, 2011 5:57 am
Re: Historical Decomposition
I bought the material, I wait for it.
Would you kindly give me more hints till I receive it as I need to finish this model as soon as I can.
Thank you very much
Would you kindly give me more hints till I receive it as I need to finish this model as soon as I can.
Thank you very much
Re: Historical Decomposition
One of the example files for the Uhlig JME 2005 paper does the historical decomposition under a sampling system. Note that this isn't included in Uhlig's paper.
-
AhmedSahlool
- Posts: 78
- Joined: Tue Jul 05, 2011 5:57 am
Re: Historical Decomposition
Dear Tom,
I hope this finds you well,
I applied the routine for my model, however, I need to get results in the same order as those obtained with History; a matrix(nvar+1,navr), which represents the average of ndraws results, so I can graph them as I need.
Would you give me some guidance.
Thank you in advance
I hope this finds you well,
I applied the routine for my model, however, I need to get results in the same order as those obtained with History; a matrix(nvar+1,navr), which represents the average of ndraws results, so I can graph them as I need.
Would you give me some guidance.
Thank you in advance
Re: Historical Decomposition
If you post what you have, I can tell you how to change it. Note, however, that if I were to redesign HISTORY now, I wouldn't arrange the output series that way---the obvious place for the base forecast is the final slot, not the first.
-
AhmedSahlool
- Posts: 78
- Joined: Tue Jul 05, 2011 5:57 am
Re: Historical Decomposition
Hi Tom,
Kindly find attached the program.
I tried to apply the routine outside the loop to see what I can get. I end with a matrix which is (nhor,nvar), the difference between "baseplus" and 'base". I need to have (NVAR+1,NVAR) for each NHOR, which is organized for History command as (nhor, nvar+1) for each NVAR.
So I don't know how to get this information after GIBBs sampling.
Do you see any with your experience any other pb with this program.
Thank you and best regards
Kindly find attached the program.
I tried to apply the routine outside the loop to see what I can get. I end with a matrix which is (nhor,nvar), the difference between "baseplus" and 'base". I need to have (NVAR+1,NVAR) for each NHOR, which is organized for History command as (nhor, nvar+1) for each NVAR.
So I don't know how to get this information after GIBBs sampling.
Do you see any with your experience any other pb with this program.
Thank you and best regards
- Attachments
-
- LVAR_Eg.xls
- (68.5 KiB) Downloaded 698 times
-
- Historical-Decomposition.RPF
- (5.31 KiB) Downloaded 977 times
Re: Historical Decomposition
I found only one case where someone has asked for this in the past. One of the problems is that the base forecast range tends to be very broad. I've attached a revision of your program which does the number crunching for a full historical decomposition. The Uhlig example does only a single shock, which requires different bookkeeping.
- Attachments
-
- historicaldecomp.rpf
- Revised program file
- (6.98 KiB) Downloaded 696 times