Announcement

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

  • Repeated time values in sample

    Hi all,

    I got a question when I doing the vector autoregression (VAR) in STATA. There is an error occurred which show repeated time values in sample r(451). And then I do the duplicates check as recommend in the following URL https://www.stata.com/support/faqs/d...d-time-values/. I can do the "tsset firm dm, monthly" command, but when I do the VAR, the error shows again. Can anyone help me with that?
    Click image for larger version

Name:	screenshot.PNG
Views:	2
Size:	15.8 KB
ID:	1574647


  • #2
    If you have panel data you'll need to fit a panel VAR. There is a user-written pvar package available from the Stata Journal.


    Code:
    search pvar
    
    st0455 from http://www.stata-journal.com/software/sj16-3
        SJ16-3 st0455. Estimation of panel vector... / Estimation of panel vector
        autoregression / in Stata / by Michael R. M. Abrigo, Philippine Institute
        / for Development Studies, Philippines / Inessa Love, Department of
        Economics, / University of Hawai`i at Manoa, USA / Support:
    Abrigo, Michael RM, and Inessa Love. "Estimation of panel vector autoregression in Stata." The Stata Journal 16, no. 3 (2016): 778-804.

    Comment


    • #3
      Hi Justin,

      Thanks for your reply. How can I do the pvar regression? what code should I use? I have just installed the package.

      Zihao

      Comment


      • #4
        Hi Zihao,

        I recommend reading through both the help file and the Stata Journal article for pvar (linked below). The Stata Journal article will walk you through the command and includes details on diagnostics and post estimation commands for pvar (pvarirf, pvarfevd, pvargranger, pvarsoc, pvarstable).

        Hope this helps,
        Justin

        https://journals.sagepub.com/doi/pdf...867X1601600314


        Comment


        • #5
          Hi Justin,

          That‘s really helpful.

          May I ask how do we interpret the panel VAR-Granger causality Wald test as shown in the following?


          panel VAR-Granger causality Wald test
          Ho: Excluded variable does not Granger-cause Equation variable
          Ha: Excluded variable Granger-causes Equation variable

          +------------------------------------------------------+
          | Equation \ Excluded | chi2 df Prob > chi2 |
          |----------------------+-------------------------------|
          |lnwCDS | |
          | wESG | 9.449 2 0.009 |
          | ALL | 9.449 2 0.009 |
          |----------------------+-------------------------------|
          |wESG | |
          | lnwCDS | 0.550 2 0.760 |
          | ALL | 0.550 2 0.760 |
          +------------------------------------------------------+

          Is the mean that there is no reverse causality between ESG and CDS?

          Comment


          • #6
            The null hypothesis that wESG does not Granger-cause lnwCDS is rejected.
            The null hypothesis that lnwCDS does not Granger-cause wESG is NOT rejected.

            If both null hypotheses gave statistically significant results you could make the statement that there is bi-directional Granger Causality.

            Your output suggests there is [Granger] causality from wESG to lnwCDS, but not the reverse.

            Hope this helps.

            Comment


            • #7
              Thanks Justin! That's really helpful!!!

              Regard,

              Zihao

              Comment

              Working...
              X