DISAGGREGATE—general procedure for interpolation

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.
fadimohamed
Posts: 17
Joined: Mon May 23, 2011 11:13 am

Re: disaggregate procedure

Unread post by fadimohamed »

Dear tom,
with respect to the constant, as mentioned in the dissagregate.src, the constant is used only in (model=AR1), is it meant here the linear model or is it meant (tsmodel=AR1)?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: disaggregate procedure

Unread post by TomDoan »

Sorry. Yes, it means TSMODEL=AR1.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by TomDoan »

ivory4 wrote:As for Stock and Watson's research memorandum "Distribution of quarterly values of GDP/GDI across months within the quarter
Background", is there a replication here?

http://www.princeton.edu/~mwatson/mgdp_gdi.html
This does one of the examples (distributing Government expenditures). It needs the updated version of @DISAGGREGATE (from the beginning of the thread) since it needs the new MAINTAIN=WEIGHTEDSUM option.
ratscode.rpf
Program file
(3.19 KiB) Downloaded 1161 times
DISTRIBUTE_GDP_GDI_INPUT.xls
Data file
(268.5 KiB) Downloaded 825 times
fadimohamed
Posts: 17
Joined: Mon May 23, 2011 11:13 am

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by fadimohamed »

Dear tom,

assuming i dont have the day of the week effect, would you provide me a plain example of how to interpolate data from
monthly to weekly?

thanks for your help
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by TomDoan »

I don't have one. Do you have an example from the literature where anyone has done this?
fadimohamed
Posts: 17
Joined: Mon May 23, 2011 11:13 am

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by fadimohamed »

i have reviewed the literature for interpolating monthly data to weekly but unfortunately all what i have found is just mentioning briefly
without a concrete methodology,

as you mentioned before
You can't use @DISAGGREGATE to do monthly to weekly. That procedure is designed to handle only frequencies which are a fixed number of subperiods. The same underlying idea can be used from monthly to weekly, but you have to figure out how you want to handle the weeks that split across months. There are many ways that one could do that, since for some data sets, there are day-of-the-week effects, so Saturday and Sunday might need different weights than the weekdays. If there are day-of-the-week effects, the input monthly data may or may not have already been adjusted for those, which makes the weight handling in the disaggregation more complicated.
so how can i handle the weekly missing data points without affecting monthly real data?

thanks
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by TomDoan »

fadimohamed wrote:i have reviewed the literature for interpolating monthly data to weekly but unfortunately all what i have found is just mentioning briefly
without a concrete methodology,

as you mentioned before
You can't use @DISAGGREGATE to do monthly to weekly. That procedure is designed to handle only frequencies which are a fixed number of subperiods. The same underlying idea can be used from monthly to weekly, but you have to figure out how you want to handle the weeks that split across months. There are many ways that one could do that, since for some data sets, there are day-of-the-week effects, so Saturday and Sunday might need different weights than the weekdays. If there are day-of-the-week effects, the input monthly data may or may not have already been adjusted for those, which makes the weight handling in the disaggregation more complicated.
so how can i handle the weekly missing data points without affecting monthly real data?

thanks
The way DISAGGREGATE works is to set up a state-space model for the higher frequency. The measurement equation has one valid observation each quarter (for monthly to quarterly) in the final month which says that Q is equal to (with no error) either the average or the sum of the unobserved monthly data. For weekly to monthly, you can create a similar state-space model for the unobservable weeks. The problem is the handling of the measurement equation. When should M be observed? That will depend upon the timing of the weekly data---it can't be until the last week which has days within that month. And how is the monthly data supposedly constructed from the weekly? Anything you do there will be based upon some assumption of how the underlying daily data would work. If you say Month=2/7 x week1 + week2 + week3 + week4 + week5 + 1/7 x week6 for a month that has one day off one end and two off the other, then you are implicitly assuming that the days in a week are roughly equal. For how many economic data series is that a reasonable assumption? Are the data at the daily level affected by holidays? It's your data, you'll have to figure out how you want to handle that.

If someone didn't describe any concrete methodology, I would speculate that they simply used something like what the RATS DATA instruction does, which is to take a week which spans the boundary between two months and takes a weighted average of the monthly numbers based upon the number of days in each month, that is,

(3 x Jan + 4 x Feb) / 7 if the week ends February 4

That's rather crude, but it's the best that can be done without making assumptions about the time series behavior of the underlying weekly data.
Jray
Posts: 4
Joined: Mon Oct 14, 2013 5:10 am

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by Jray »

Hi again!

In the disaggrgate.src file, it says that 'Make sure that you include the CONSTANT if you're suing TSMODEL=AR1.' I already tried running the code with AR1 model and got some result but I'm concerned that the result might be inaccurate since I did not include the constant. How do I include it?

If I run the code with NOESTIMATE, will it use rho=0.9?

Lastly, is there a way to know which MODEL (linear, loglin, multiplicative) and TSMODEL (RW1, AR1, RWAR1, RW2) to use given my data. I'm trying to derive quarterly GDP from annual GDP.

Thanks much!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by TomDoan »

Jray wrote:Hi again!

In the disaggrgate.src file, it says that 'Make sure that you include the CONSTANT if you're suing TSMODEL=AR1.' I already tried running the code with AR1 model and got some result but I'm concerned that the result might be inaccurate since I did not include the constant. How do I include it?

If I run the code with NOESTIMATE, will it use rho=0.9?

Lastly, is there a way to know which MODEL (linear, loglin, multiplicative) and TSMODEL (RW1, AR1, RWAR1, RW2) to use given my data. I'm trying to derive quarterly GDP from annual GDP.

Thanks much!
The example in the first post in the thread does annual to quarterly GDP, so you might want to look at it. If you use TSMODEL=AR1 without a constant in your "related variables" list, then throw it out and redo it. However, I wouldn't recommend MODEL=AR1 (basically Chow-Lin) for GDP. I would recommend doing MODEL=LOGLIN; the choice of TSMODEL (other than AR1) will make relatively little difference. You might want to read the chapter from the State Space course that's posted above.
Jray
Posts: 4
Joined: Mon Oct 14, 2013 5:10 am

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by Jray »

Hi Tom,
Thanks for your help. I'm trying to run the TS models with my data and the results have just little differences. Is there a way I could check which one is superior? For now I'm just looking at the standard error that comes with it. Are there stats that can be used to compare the results?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by TomDoan »

The only real fit statistic is the %LOGL.

If the generated series are basically similar, then there is no "right" or "wrong" choice.
Jray
Posts: 4
Joined: Mon Oct 14, 2013 5:10 am

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by Jray »

Thanks for your reply. I'm wondering if it is possible to obtain the beta/s or coefficient/s of the relationship between the low frequency series and the high frequency series? The function gives the final disaggregated values but I would like to see, if possible, the "behind-the-scene" numbers. Thanks again!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by TomDoan »

Jray wrote:Thanks for your reply. I'm wondering if it is possible to obtain the beta/s or coefficient/s of the relationship between the low frequency series and the high frequency series? The function gives the final disaggregated values but I would like to see, if possible, the "behind-the-scene" numbers. Thanks again!
Did you try using the PRINT option?
Jray
Posts: 4
Joined: Mon Oct 14, 2013 5:10 am

Re: DISAGGREGATE - a general procedure for interpolation

Unread post by Jray »

Thanks a lot! PRINT option works. For the proportional denton model, does it really give coefficient=1? I've done for several data and coefficient is equal to 1.
mai_villaruel
Posts: 2
Joined: Fri Jul 11, 2014 12:54 am

retrieving ARIMA model of the error process

Unread post by mai_villaruel »

Hi

Im currently working on the disaggregate.src

the model that im using is

@disaggregate(tsmodel=rwar1,model=loglin,factor=4,maintain=sum,print) arm_gdpa 2000:1 2012:4 arm_gdpq_rv

Is there a way on how to retrieve the ARIMA model (tsmodel=rwar1) of the error process using the disaggregate program?

Thank you.
Post Reply