Announcement

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

  • Repeated time values in sample r(451)

    Dear Statalist!

    I have panel data. I want to select number of lags.
    I type:


    tsset quocgia year
    -> tsset quocgia year
    panel variable: quocgia (strongly balanced)
    time variable: year, 1998 to 2013
    delta: 1 year

    varsoc lngdp lnyt lngd
    -> repeated time values in sample
    r(451);

    What should I do next?
    Thank you!







  • #2
    Many posts here on varsoc and panel data: e.g. http://www.statalist.org/forums/foru...ith-panel-data

    Comment


    • #3
      Tks Nick! But I can't find any suitable answer for my case.
      Sorry for my bad English. :'(

      Comment


      • #4
        Not my field, but the accepted answer appears to be that you need to loop over panels to apply varsoc to each individually. But your problem probably needs a different approach. Sorry, but I can't advise.

        Comment


        • #5
          -varsoc- is meant for time series data, not for panel data
          Last edited by Eric de Souza; 13 Apr 2016, 06:11. Reason: Previous (immediately edited) post did not notice the panel data structure of your data

          Comment


          • #6
            Eric: sure, but that dataset is not panel data. (Or, if you like, it's a single panel.)

            The problem is with panel data: does applying varsoc then make sense? how best to do it? As #2 implies, this is frequently asked here.

            Comment


            • #7
              Nick: #1 indicates that there are several panels. The error message he gets is what you get when you apply -varsoc- to panel data:
              Code:
              webuse grunfeld
              varsoc invest mvalue kstock
              The dataset "grunfeld.dta" contains 10 panels (companies), and, therefore, the same year is repeated ten times.
              Trang Dong doesn't have a long enough time series for each panel to apply a -var- (Vector AutoRegression) to each panel separately.

              Comment


              • #8
                Eric: Quite so. I understood the first point exactly.

                Your point about series length does seem crucial.

                Comment


                • #9
                  How to decide the lag length for panel data? kindly help

                  Comment

                  Working...
                  X