Announcement

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

  • varsoc with logarithms variables

    I've transformed my variables into logarithms to analyze their elasticities, when I run the command with them like this it's hard to choose the best number of lags. I would like to know if there is a difference between using normal variables.


    Code:
     varsoc IGPDI CAMBIONOMINAL PIB SELIC , maxlag(8)
    
       Selection-order criteria
       Sample:  2015m9 - 2021m6                     Number of obs      =        70
      +---------------------------------------------------------------------------+
      |lag |    LL      LR      df    p      FPE       AIC      HQIC      SBIC    |
      |----+----------------------------------------------------------------------|
      |  0 |  -1281.3                      1.0e+11   36.7229   36.7739   36.8514  |
      |  1 | -924.378  713.85   16  0.000  6.1e+06   26.9822   27.2374   27.6247* |
      |  2 | -899.369  50.018   16  0.000  4.8e+06*  26.7248*  27.1841*  27.8812  |
      |  3 | -890.653  17.432   16  0.358  5.9e+06   26.9329   27.5964   28.6032  |
      |  4 | -875.526  30.253   16  0.017  6.2e+06   26.9579   27.8255   29.1421  |
      |  5 | -865.742  19.569   16  0.240  7.7e+06   27.1355   28.2072   29.8337  |
      |  6 | -854.908  21.668   16  0.154  9.5e+06   27.2831    28.559   30.4952  |
      |  7 | -844.337  21.142   16  0.173  1.2e+07   27.4382   28.9182   31.1643  |
      |  8 | -818.619  51.435*  16  0.000  1.0e+07   27.1605   28.8447   31.4006  |
      +---------------------------------------------------------------------------+
       Endogenous:  IGPDI CAMBIONOMINAL PIB SELIC
        Exogenous:  _cons
    
    
    . varsoc ln_igpdi ln_cambion ln_pib ln_selic , maxlag(8)
    
       Selection-order criteria
       Sample:  2015m9 - 2021m6                     Number of obs      =        70
      +---------------------------------------------------------------------------+
      |lag |    LL      LR      df    p      FPE       AIC      HQIC      SBIC    |
      |----+----------------------------------------------------------------------|
      |  0 |  215.911                      2.8e-08   -6.0546  -6.00357  -5.92612  |
      |  1 |  566.881  701.94   16  0.000  1.9e-12  -15.6252    -15.37* -14.9828* |
      |  2 |  588.474  43.186   16  0.000  1.6e-12   -15.785  -15.3257  -14.6286  |
      |  3 |  602.542  28.135   16  0.030  1.8e-12  -15.7298  -15.0663  -14.0595  |
      |  4 |  626.245  47.406   16  0.000  1.4e-12* -15.9499* -15.0822  -13.7656  |
      |  5 |   635.48   18.47   16  0.297  1.8e-12  -15.7566  -14.6848  -13.0584  |
      |  6 |  650.162  29.364   16  0.022  2.0e-12  -15.7189   -14.443  -12.5068  |
      |  7 |  663.402  26.479   16  0.048  2.3e-12    -15.64    -14.16   -11.914  |
      |  8 |  689.292  51.781*  16  0.000  2.0e-12  -15.9226  -14.2385  -11.6826  |
      +---------------------------------------------------------------------------+
       Endogenous:  ln_igpdi ln_cambion ln_pib ln_selic
        Exogenous:  _cons

  • #2
    I know almost nothing about this territory, but

    1. What do you mean by "normal" variables? Perhaps the original data.

    2. In general, I wouldn't expect the same results unless you are talking about a linear transformation, and you aren't.

    3. Whether logarithmic scale is better depends on various details, for example

    a. It is necessary but not sufficient that the original values are all positive. (On occasion, working with logarithms can create massive outliers.)

    b. Logarithms can make trends and variability simpler or at least easier to work with.

    c. Sometimes there is a subject-matter reason why working with logarithms is a better idea.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      I know almost nothing about this territory, but

      1. What do you mean by "normal" variables? Perhaps the original data.

      2. In general, I wouldn't expect the same results unless you are talking about a linear transformation, and you aren't.

      3. Whether logarithmic scale is better depends on various details, for example

      a. It is necessary but not sufficient that the original values are all positive. (On occasion, working with logarithms can create massive outliers.)

      b. Logarithms can make trends and variability simpler or at least easier to work with.

      c. Sometimes there is a subject-matter reason why working with logarithms is a better idea.
      Hi, thanks for the reply.
      Yes, the "normal" data is the original data, before using the
      Code:
      ln()
      function in stata.
      I need to report the results of varsoc in a table and I would like to know if the "real" number of lags is that obtained by the original or logarithmized variables, and to be honest I don't even know how to choose the right number of lags when I run the test with the log values

      Comment


      • #4
        I think you're treating varsoc as an oracle -- and oracles traditionally give cryptic or ambiguous advice. As said, I am not any expert, or even slightly experienced, in this field. I can't go beyond a standard remark that if transforming variables gives you a different result, you need to choose between different versions of the data, original or transformed.

        As a detail, I would certainly advise against "normal" being used as you did.

        Most crucially, you need to hope for better advice from a time series expert.

        Comment

        Working...
        X