Hello,

I am facing a problem with my panel data which has "loans disbursed" as a panel variable and "quarters" as time variable. I have reshaped the data in a long-form to create something like this:

Quarter Loans Country price variable
q1 2006 loans for Country A 1 20
q2 2006 loans for Country A 1 22
q3 2006 loans Country A 1 23
q1 2006 loans for Country B 2 20
q2 2006 loans for Country B 2 22
q3 2006 loans for Country B 2 23
q1 2007 loans for country A 1 24
q2 2007 loans for country A 1 25
q3 2007 loans for country A 1 26
q1 2007 loans for country B 2 24
and so on. The Data is for 20 countries and 15 years (so 60 quarters). The price changes are quarterly.

I tried doing an xtreg regression

xtreg loans price

But it gives the following error:the panel variable loans may not be included as an independent variable.

When I tried doing the xtset command to convert the loans into panel i.e. xtset loans quarter, it returns the following error: repeated time values within panel

Could anyone suggest where I have gone wrong? I really need your help as the deadline for my project is approaching.