Announcement

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

  • Error: repeated time values in sample

    I am trying to use Vector Autoregression (VAR) model. I have even defined tsset.. but there is an error that keeps coming up 'repeated time values in sample'.. I have tried everything to resolve this but there seems to be no solution..

    Code:
    . var happinessindex, lags(1/2) exog(gvaperheadbalanced)
    repeated time values in sample
    r(451);
    
    . var happinessindex gvaperheadbalanced, lags(1/2)
    repeated time values in sample
    r(451);
    
    . tsset nLAname year
           panel variable:  nLAname (strongly balanced)
            time variable:  year, 2011 to 2016
                    delta:  1 unit
    
    . var happinessindex gvaperheadbalanced
    repeated time values in sample
    r(451);

  • #2
    Perhaps
    Code:
    duplicates report nLAname year
    will help you understand where to look for the duplicates in your data. See help duplicates for more details on this command.

    And if that doesn't show you any duplicates, then the problem is perhaps that you have panel data, but var only works on a single time series. This is guesswork on my part, I do not use VAR models, but it seems suggested by the documentation in the output of help var.
    Last edited by William Lisowski; 07 May 2018, 18:56.

    Comment

    Working...
    X