Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Temporal disaggregation with no indicator in Stata?!

    Hi all

    Is there any code available in Stata for time series disaggregation with no indicator variable?
    I understand that -mipolate- and -denton- require an indicator variable.

    Thanks

  • #2
    Hi again

    My aim is to create monthly time series from a quarterly series. This can be done in Stata using -denton- however the Denton approach requires another monthly series that is deemed correlated with the original series (i.e., an indicator series). If there is no indicator series, there are several approaches to disaggregate the time series. These approaches are offered in other databases.

    Do we have any approach available in Stata to do this job?

    Thanks

    Comment


    • #3
      Sure; replicate the quarterly series 3 times and divide by 3 if that appears needed for interpretation. In fact you don't need to replicate, as that will be done as a side-effect of an appropriate merge.

      Then consider smoothing.

      But, as you know, there's no white magic to create information, if you have none, on variation within quarters.

      Comment


      • #4
        Dear Nick (and participants)

        Thank you so much. Just to be sure I get you correctly. I interpret your suggestion as follows.

        Code:
        use quarterly_gdp_data.dta
        
        expand 3
        
        sort quarter_date
        
        gen monthly_gdp=quarterly_gdp/3
        
        smooth 3RSSH,twice monthly_gdp, gen (smoothed_monthly_gdp)
        I have three questions:

        1- Is this the appropriate application for your suggestion?

        2- Is this approach theoretically motivated? In other words, if applied in my research, what would be the theoretical reference for that?

        2- I am asking about some well-known methods, for example, as in Boot et al. 1967. Reference is: Boot, J. C., Feibes, W., and Lisman, J. H. C., 1967. Further methods of derivation of quarterly figures from annual data. Applied Statistics, 16(1), pp.65-75.
        Are there any formal approaches in Stata to disaggregate a low-frequency series to a high-frequency series? For example, can we use the Kalman filter to model unobservable monthly series from a quarterly series?



        Thanks and I look forward to hearing back


        Comment


        • #5
          I wasn't really holding anything back. Also, I am not an economist and don't work with this kind of data myself.

          Whether the measure of interest is a stock or a flow is of some importance. In this context whether the measure is seasonally adjusted may be even more important.

          The mention of smoothing arises from the following kind of reflection. Suppose a quarter with a higher value H is followed by a quarter with a lower value L so when replicated the values run

          H H H L L L
          1 2 3 4 5 6


          Evidently dividing by 3 if appropriate does not change the main idea.

          I guess that most researchers would guess that the jump from month 3 to month 4 was exaggerated by aggregation and might want to smooth so that the value for month 3 was lower and the value for month 4 was higher.

          But (1) the data don't rule out that month 3 was really quite high and 4 was really quite low, so that any smoothing might go the wrong way.

          (2) the smoothed values now violate the "known" facts for the two quarters, as the sum or mean over months in each quarter will be changed.

          At the risk of saying something ignorant or foolish I doubt that there is any theory to guide there -- and I doubt that any standard methods of smoothing quite fit what is needed, which is basically some adjustment within quarters to match differences between quarters.

          I haven't read the reference in #4. For all I know it thinks through all of this, which is no doubt elementary, and comes with practical methods, which you then might need to code for yourself.

          Comment


          • #6
            Take a look at Nick's response in #3 here

            https://www.statalist.org/forums/for...ate-stripolate

            Comment


            • #7
              Justin Blasongame helpfully reminded me of earlier suggestions. Put together they suggest a relatively simple interpolation-based method that preserves quarterly means as the original quarterly values.

              I would not be surprised if this were already a known or standard method, or that there are known or standard methods with better properties.


              Code:
              * Example generated by -dataex-. To install: ssc install dataex
              clear
              
              * step 0: have replicated values of quarterly data 
              
              input float(mdate qdate value)
              720 240 1
              721 240 1
              722 240 1
              723 241 2
              724 241 2
              725 241 2
              726 242 3
              727 242 3
              728 242 3
              729 243 4
              730 243 4
              731 243 4
              end
              
              * step 1: use values for months 2, 5, 8, 11, the middles of each quarter 
              
              gen work = value if inlist(month(dofm(mdate)), 2, 5, 8, 11)
              
              * step 2: interpolate between selected values 
              * detail: optionally extrapolate 
              * detail: optionally use another interpolation method 
              
              ipolate work mdate, gen(work2)
              
              * step 3: find quarterly mean of interpolated values 
              egen mean = mean(work2), by(qdate)
              
              * step 4: correct interpolated values to have same means as original 
              
              gen work3 = work2 * value/mean
              
              list, sepby(qdate)
              
                   +----------------------------------------------------------------+
                   | mdate   qdate   value   work       work2       mean      work3 |
                   |----------------------------------------------------------------|
                1. |   720     240       1      .           .   1.166667          . |
                2. |   721     240       1      1           1   1.166667   .8571429 |
                3. |   722     240       1      .   1.3333333   1.166667   1.142857 |
                   |----------------------------------------------------------------|
                4. |   723     241       2      .   1.6666667          2   1.666667 |
                5. |   724     241       2      2           2          2          2 |
                6. |   725     241       2      .   2.3333333          2   2.333333 |
                   |----------------------------------------------------------------|
                7. |   726     242       3      .   2.6666667          3   2.666667 |
                8. |   727     242       3      3           3          3          3 |
                9. |   728     242       3      .   3.3333333          3   3.333333 |
                   |----------------------------------------------------------------|
               10. |   729     243       4      .   3.6666667   3.833333   3.826087 |
               11. |   730     243       4      4           4   3.833333   4.173913 |
               12. |   731     243       4      .           .   3.833333          . |
                   +----------------------------------------------------------------+

              Comment

              Working...
              X