Announcement

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

  • -vecrank- error

    Hey, I have a monthly time series data from 2005m1 to 2018m12. On visual inspection there are no gaps or missing values in any of the variables. But while running the vecrank command an error message appears "the sample has gaps"

    Is there any to be done to the data before vecrank apart from tsset?


  • #2
    Visual inspection is all well and good, but you should use Stata to tell you what it sees.
    Code:
    . webuse balance2, clear
    (macro data for VECM/balance study)
    
    . tsset
            time variable:  t, 1959q1 to 1982q4
                    delta:  1 quarter
    
    . misstable summarize y i c
    (variables nonmissing or string)
    
    . vecrank y i c
    
                           Johansen tests for cointegration                        
    Trend: constant                                         Number of obs =      94
    Sample:  1959q3 - 1982q4                                         Lags =       2
    -------------------------------------------------------------------------------
                                                             5%
    maximum                                      trace    critical
      rank    parms       LL       eigenvalue  statistic    value
        0      12      1248.3378           .     32.4539    29.68
        1      17      1255.4976     0.14130     18.1344    15.41
        2      20      1260.7009     0.10480      7.7277     3.76
        3      21      1264.5648     0.07892
    -------------------------------------------------------------------------------
    
    .
    . replace c = . in 4
    (1 real change made, 1 to missing)
    
    . tsset
            time variable:  t, 1959q1 to 1982q4
                    delta:  1 quarter
    
    . misstable summarize y i c
                                                                   Obs<.
                                                    +------------------------------
                   |                                | Unique
          Variable |     Obs=.     Obs>.     Obs<.  | values        Min         Max
      -------------+--------------------------------+------------------------------
                 c |         1                  95  |     95    3.01136    4.110415
      -----------------------------------------------------------------------------
    
    . vecrank y i c
    the sample has gaps
    r(498);
    
    .
    . drop in 4
    (1 observation deleted)
    
    . tsset
            time variable:  t, 1959q1 to 1982q4, but with a gap
                    delta:  1 quarter
    
    . misstable summarize y i c
    (variables nonmissing or string)
    
    . vecrank y i c
    the sample has gaps
    r(498);
    Last edited by William Lisowski; 24 May 2019, 09:47.

    Comment

    Working...
    X