Announcement

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

  • Stationarity in Macroeconomic Panel Data

    Dear Statalist,

    I am working on my dissertation which includes an analysis of macroeconomic data such as GDP and trade. As I do not have much previous experience with macroeconomic data, I have a few questions regarding stationarity in panel data.

    1. If the dependent variable exhibits stationarity, is it required that all of the independent variables exhibit stationarity as well?

    2. If non-stationarity is found within one of the independent variables, should every included variable be first-differenced/detrended or is this only required for the independent variables that exhibit non-stationarity?

    3. Should stationarity also be tested for in instruments used for a two-stage least squares regression?


    Kind regards,

    Camille Smith

  • #2
    What are the dimensions of your panel? If you have a wide panel \((N > T)\), I would advise you not to bother checking for stationarity. Just proceed with the standard panel data methods. Stationarity is an issue in long panels \((T > N)\), but macroeconomic variables are for the most part integrated of order 1 \(I(1)\), which means that they are stationary after differencing.

    Comment


    • #3
      Apart from the useful advice by Andrew, if you have a long panel (T relatively large, N relatively small) you should worry about stationarity as Andrew said, and you can see how to deal with the variables by looking at previous published research. E.g., I do not think I have ever read a paper published in a reputable journal in Finance using prices -- everybody uses returns, and there is no testing for the stationarity properties of prices and returns.

      Comment


      • #4
        Thank you very much for your help! I have a short panel and I therefore wonder if you have a recommendation of a book where this is stated in order for me to read more about it?

        Comment


        • #5
          A nice introductory book is Introductory Econometrics: A Modern Approach by Jeff Wooldridge. There is some discussion in the chapter on advanced panel data methods. Here is some relevant quote from that chapter:

          When T is large, and especially when N is not very large (for example, N = 20 and T = 30), we must exercise caution in using the fixed effects estimator. Although exact distributional results hold for any N and T under the classical fixed effects assumptions, inference can be very sensitive to violations of the assumptions when N is small and T is large. In particular, if we are using unit root processes—see Chapter 11—the spurious regression problem can arise. First differencing has the advantage of turning an integrated time series process into a weakly dependent process. Therefore, if we apply first differencing, we can appeal to the central limit theorem even in cases where T is larger than N. Normality in the idiosyncratic errors is not needed, and heteroskedasticity and serial correlation can be dealt with as we touched on in Chapter 13. Inference with the fixed effects estimator is potentially more sensitive to nonnormality, heteroskedasticity, and serial correlation in the idiosyncratic errors.

          Comment


          • #6
            Thank you for the recommendation! I will read more about it there!

            Comment


            • #7
              Hello,

              I am using Stata 14. The data type of my research is panel data (unbalanced); the time period is 22 years; I have annual data for 5084 firms. My model includes 10 explanatory variables (X1, X2, …, X10).

              I tried to test for Stationarity for the dependent variable Y and for each explanatory variable included in my model. I applied the command ‘xtunitroot’ with the option ‘IPS’. i.e., to test for Stationarity for the dependent variable Y, I typed in Stata the following: xtunitroot ips Y. Stata shows the following message: “insufficient observations r(2001);”.

              To test for Stationarity for the first explanatory variable X1, I typed in Stata the following: xtunitroot ips X1. Stata shows the following message: “no observations r(2000);”.

              Therefore, I kindly ask you please to highlight what I did wrong and what I should do.

              Thank you in advance.
              Last edited by Zainab Mariam; 11 Jul 2022, 10:30.

              Comment


              • #8
                Note that the Im-Pesaran-Shin test requires that your data have no gaps.


                Im-Pesaran-Shin test:

                The IPS test does not require strongly balanced data, but there can be no gaps in each individual time series.
                Of the official panel unit root tests, I think that only Fisher-type tests allow unbalanced panels with gaps:

                Fisher-type tests:
                xtunitroot fisher does not require strongly balanced data, and the individual series can have gaps.
                See

                Code:
                help xtunitroot
                for more.

                Comment


                • #9
                  Dear Professor Andrew,
                  Thank you for your reply.

                  It is written in ‘help xtunitroot’ the following:

                  xtunitroot fisher performs either ADF or Phillips–Perron unit-root tests on each panel depending on whether you specify the dfuller or pperron option.
                  You must specify either the dfuller or the pperron option.

                  My first question is: how to decide whether I should specify the ‘dfuller’ or ‘pperron’ option?

                  Also, it is written in ‘help xtunitroot’ the following:
                  xtunitroot fisher y, pperron lags(1)
                  xtunitroot fisher lnrxrate, dfuller drift lags(2) demean

                  My second question is: how to decide how many lags I should specify for each option i.e., how to decide the number of lags for the ‘dfuller’ option and for the ‘pperron’ option?

                  My third question is: is it required for ‘xtunitroot fisher’ with the option ‘dfuller’ to type ‘drift’ ‘demean’?

                  To test for Stationarity for the dependent variable y, I typed in Stata the following:

                  xtunitroot fisher y, pperron lag(1)

                  Stata shows two parts where the first part is long, thus, I will report just the first four lines and the last line as follows:

                  could not compute test for panel 687
                  could not compute test for panel 691
                  could not compute test for panel 756
                  could not compute test for panel 1077

                  could not compute test for panel 5014


                  My question is: what does this first part mean?

                  Your help and cooperation are highly appreciated.

                  Comment


                  • #10
                    My first question is: how to decide whether I should specify the ‘dfuller’ or ‘pperron’ option?

                    Also, it is written in ‘help xtunitroot’ the following:
                    xtunitroot fisher y, pperron lags(1)
                    xtunitroot fisher lnrxrate, dfuller drift lags(2) demean

                    My second question is: how to decide how many lags I should specify for each option i.e., how to decide the number of lags for the ‘dfuller’ option and for the ‘pperron’ option?

                    My third question is: is it required for ‘xtunitroot fisher’ with the option ‘dfuller’ to type ‘drift’ ‘demean’?
                    I do not closely follow this literature as the data that I deal with is large \(N\) and small \(T\), where stationarity is not an issue. The lag order depends on the order of serial correlation, i.e., first order, second order, and so on. Based on the time-series literature, I think the difference between Dickey-Fuller and Phillips-Perron lies in how serial correlation is modeled, where the latter ignores this and the former uses an AR process to approximate the structure of the errors. You can compare the results from both as a robustness check. The options are discussed in the PDF manuel entry of the command and depend on the nature of your data.


                    could not compute test for panel 687
                    could not compute test for panel 691
                    could not compute test for panel 756
                    could not compute test for panel 1077

                    could not compute test for panel 5014

                    My question is: what does this first part mean?
                    As you are taking lags, you need several consecutive time periods for each panel to perform the test. So if this is not the case for some panels, the test cannot be computed. A better approach is to start a new thread and describe your data, size of \(T\) and \(N\) dimensions and research question. In this way, someone in the forum will be able to suggest an estimation procedure and comment on whether these stationarity tests are needed.
                    Last edited by Andrew Musau; 17 Jul 2022, 10:57.

                    Comment


                    • #11
                      Dear Professor Andrew,

                      Thank you for your reply.

                      I do appreciate your cooperation.

                      Comment


                      • #12
                        Originally posted by Andrew Musau View Post

                        I do not closely follow this literature as the data that I deal with is large \(N\) and small \(T\), where stationarity is not an issue. The lag order depends on the order of serial correlation, i.e., first order, second order, and so on. Based on the time-series literature, I think the difference between Dickey-Fuller and Phillips-Perron lies in how serial correlation is modeled, where the latter ignores this and the former uses an AR process to approximate the structure of the errors. You can compare the results from both as a robustness check. The options are discussed in the PDF manuel entry of the command and depend on the nature of your data.




                        As you are taking lags, you need several consecutive time periods for each panel to perform the test. So if this is not the case for some panels, the test cannot be computed. A better approach is to start a new thread and describe your data, size of \(T\) and \(N\) dimensions and research question. In this way, someone in the forum will be able to suggest an estimation procedure and comment on whether these stationarity tests are needed.
                        Dear professor Andrew,
                        Following up the thread of ML estimates, I am apply the following code
                        HTML Code:
                        xtunitroot fisher  PEG , dfuller drift lags(2) demean
                        I got the following results
                        Fisher-type unit-root test for PEG
                        Based on augmented Dickey-Fuller tests
                        --------------------------------------
                        Ho: All panels contain unit roots Number of panels = 3306
                        Ha: At least one panel is stationary Avg. number of periods = 4.22

                        AR parameter: Panel-specific Asymptotics: T -> Infinity
                        Panel means: Included
                        Time trend: Not included Cross-sectional means removed
                        Drift term: Included ADF regressions: 2 lags
                        ------------------------------------------------------------------------------
                        Statistic p-value
                        ------------------------------------------------------------------------------
                        Inverse chi-squared(88) P 141.6551 0.0003
                        Inverse normal Z -4.4283 0.0000
                        Inverse logit t(224) L* -4.0674 0.0000
                        Modified inv. chi-squared Pm 4.0444 0.0000
                        ------------------------------------------------------------------------------
                        P statistic requires number of panels to be finite.
                        Other statistics are suitable for finite or infinite number of panels.
                        ------------------------------------------------------------------------------

                        .
                        Could you please tell me what I should report ?
                        2- should I run the model for each variable in my empirical model ? here is my empirical model
                        HTML Code:
                        reg PEG GP Size TobinQ Lev RoA ListAge restatement disacc csr SOE Top1 INST Board Indep Dual i.year
                        Please help
                        Best,

                        Comment


                        • #13
                          Ho: All panels contain unit roots Number of panels = 3306
                          Ha: At least one panel is stationary Avg. number of periods = 4.22
                          I don't see why you need to test for stationarity with those \(N\) and \(T\) values.

                          Comment


                          • #14
                            Andrew Musau kindly advice me for stationarity test in case of
                            Code:
                            Ho: All panels contain unit roots           Number of panels       =   1892
                            Ha: At least one panel is stationary        Avg. number of periods =  21.59
                            in case you advice me to not go for stationarity test kindly give some references. thank you so much

                            Comment


                            • #15
                              Number of panels = 1892
                              Avg. number of periods = 21.59
                              You have \(N>>T\), so I would not worry about stationarity of variables. There is some discussion in the book referenced in #5 where a relevant quote is enclosed.

                              Comment

                              Working...
                              X