So I am trying to run a regression with FDI as the dependent variable and I have a few independent variables such as Exchange Rates, Volatility etc. for different countries.

I had a variable 'Year' with the years 2000 to 2018 listed for each country and a variable 'Quarter' for Q1 to Q4 for each year.

After importing my data to STATA I go to 'Statistics' , 'Longitudinal/pandel data', 'setup and utilities' and lastly 'declare dataset to be panel data'.

I select my CountryID as 'Panel ID variable' and for the time variable I select 'Year'

Since my data is quarterly data I select Quarterly and once I click OK I receive the error message 'repeated time values within panel'

r(451);

So then I tried to change the way I had the years listed in Excel (I rewrote it to 2000-1, 2000-2, 2000-3, 2000-4, 2001-1 and so on) and retried, but then it does not even give me the option to choose 'year' as my time variable. It doesn't show up in my lists of variables to choose from.

What to do now? I'm clearly doing something wrong with the way I'm writing the data but not sure how to fix this.

Similar questions and discussions