Announcement

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

  • Seasonal Adjustment in Quarterly Panel Data with gaps

    Hello


    I need to check the seasonality and do seasonal adjustment for my variables. I have quarterly time-series panel data. My data contain gaps, and gap summary is:

    xtset id qdate
    panel variable: id (strongly balanced)
    time variable: qdate, 2008q1 to 2016q3, but with gaps
    delta: 1 quarter

    Gap summary report
    --------------------------------------------------------
    | --Number of--
    Variable | Start End Obs. Gaps
    -------------+------------------------------------------
    qdate | 2008q1 2016q3 1,426 229
    --------------------------------------------------------


    My data look like:
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float hw_f_crop int year str6 qdate str14 id
    12.5201 2008 "2008q1" "Alabama"
    14.7581 2008 "2008q2" "Alabama"
    14.1221 2008 "2008q4" "Alabama"
    12.4227 2009 "2009q1" "Alabama"
    12.9639 2009 "2009q3" "Alabama"
    17.1714 2009 "2009q4" "Alabama"
    13.6637 2010 "2010q1" "Alabama"
    15.1952 2010 "2010q3" "Alabama"
    15.2895 2010 "2010q4" "Alabama"
    12.8267 2011 "2011q1" "Alabama"
    end
    I tried X12 procedure but it won't work in my sample data. I would appreciate if anyone could guide me.

    Thank you.

  • #2
    You are I guess an economist. It's usually economists who regard seasonality as irrelevant or a nuisance and want to adjust it out of the way. As an environmental scientist of sorts I regard seasonlity as interesting and important and want to model it directly.

    That aside, a problem is that you give no statement of goals. You have quarterly data but give no signal of whether this is just a panel time series problem or there are extra predictors that you'd want to include in a model.

    Further, the existence of gaps needs more comment.

    Comment


    • #3

      Dear Nick


      Thank you for your reply. Yes, I am an economist and I need to do seasonal adjustment for my variables before estimating my model.

      I have two variables: price and employment. I need to check the seasonality for each single variable.

      My data are quarterly panel time-series. However, there are one or two quarters missing across a year. Some individuals have two missing quarters in a year, others might have one or three.
      when I was trying to use x-12 procedure, I got this error:

      sax12 hw_f_crop , satype(single) transfunc(auto)
      Time gaps not allowed, use 'tsreport' to check it!

      I reported the summary gaps and a sample of my data in the previous post.
      I appreciate your help.

      Comment


      • #4
        I doubt that anything so fancy as X12 is either needed or justified. All you've said about gaps is that they exist, not why: for example, does a gap occur because nothing happened or because there was some human omission in recording:?

        Why not smooth the data gently?

        Comment


        • #5
          I need a large number of observations to have a better estimation in my econometrics model. Since there are many missing values in some quarters, I deleted them so gaps occur.

          Comment


          • #6
            Sounds the wrong way round to me. Use all the time series you have to get quarterly adjusted data. If missings are a problem then Stata will just ignore the corresponding observations any way.

            Comment

            Working...
            X