Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Repeating values error in panel data

From   Nick Cox <>
Subject   Re: st: Repeating values error in panel data
Date   Sat, 23 Apr 2011 10:18:12 +0100

1995-2005 sounds like 11 years to me!

More importantly,

1. The key question is what do you regard as a panel? Is it

(reporting, partner)  , time

or what?

2. -egen, group()- should be fairly fast.

3. I don't see how you might handle changes in time is material to how
you define a panel.


On Sat, Apr 23, 2011 at 6:56 AM, Martin Pszczola <> wrote:

>    I have trade data for 10 years between 1995-2005. Each of those years repeat in the data set because there are numerous combinations of reporting countries and partner countries. In trying to xtset, I get an error saying that the panel cannot be set because of repeating years. Other than differencing to remove the time trend, how may I set up the panel in Stata without fundamentally changing the data set?  I have tried the suggestion posted by Cox in an earlier thread suggesting "egen panelid=group(var1 va2) but it seems to take Stata a long time to digest due to the size of the data. Any help will be appreciated.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index