# Unique time variable panel regression fixed effect

Currently I am working on my master thesis which is about risk-adjusted returns (Sharpe ratio) of Asian REITs. I just transformed all the data in variables which are ready to use in Stata.

My data consist of year (2002 till 2012), Key (cusip identifier), Country, and all sorts of firm specific characteristics.

For declaring a panel data in Stata, we have to declare two variables - Panel and Time.

But Time variable must be unique, that is, no duplicate time in each panel. But when I declare "Country" as panel variable and "Year" as time variable, there is a problem. Problem is the duplicate year in each panel. For example, Japan has several entries for the year 2002. But for panel data there should not duplicate time values.

I think I need to define a unique time variable or drop time variable from the analysis. Using only panel variable I can run panel data regression, but time series analysis such as unit root can't be run. So, question is how I declare a time variable?

Your emphasis is likely to be the wrong way round. Throwing away time as a variable is unlikely to be the best way forward.

You need to think hard about what is a panel. If you really want countries to be panels, then you may need to average or otherwise combine repeated observations for the same country and the same year.

But it sounds as if your panels are firms. If so, firm should be the panel identifier.

I don't know what cusip identifier is.

• Best to look at it backwards. If you want to use any method that requires tsset or xtset first, then you must have no more than one (panel identifier, time) pair. But you can define panels as (country, firm) pairs and that's often a good idea. See stata-journal.com/sjpdf.html?articlenum=dm0034 for technique. egen panel = group(country firm), label would be an example. May 8, 2013 at 12:28