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: problem with levpet command

From   "Brian P. Poi" <>
Subject   Re: st: problem with levpet command
Date   Wed, 01 Jun 2011 20:45:02 -0400

On 05/31/2011 07:23 PM, Tuki wrote:
Hi there,
I'm attempting to estimate firm-level productivity using panel data.
To do so, I'm using levpet command by Petrin et al(2004).
After removing all the duplicates and missing values and labelling the data
as  panel/time-series using xtset/tsset, I keep on receiving error message
"repeated time values within panel". surprisingly, I have no problem working
with opreg command by Yasar et al (2008). What is the solution?!

  Any suggestion is highly appreciable.

The most likely cause of this problem is that your panel identifier variable takes on values with more than about 7 digits. (Somewhat embarrassingly) our code generates a temporary panel variable of storage type float, though float variables can't store numbers with more than about 7 digits of accuracy.

The solution is simple. Say your current panel variable is called "id". Then

   . egen newid = group(id)

and use -levpet- as though "newid" is your panel identifier variable. -egen, group- creates a new panel variable that starts at one and increases sequentially, so you won't have a problem with long panel variable values.

   -- Brian Poi
*   For searches and help try:

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