Hi!

I am wondering if it is at all possible to do a first difference regression with panel data that has multiple observations per year.

The data I am using is a survey that about 20 000 people answer every year. I have observations from between 2011 and 2017. I would like to see how people's social trust is affected by different variables that I also have included in the data set (such as gini coefficient for all the counties that the respondents are from).

If i run the command "tsset IDnr year, yearly" i get this result:

panel variable: IDnr (unbalanced)
time variable: year, 2011 to 2017, but with gaps
delta: 1 year


And when I run the regression "reg d.y d.x1 x2" I get a very low number of observations (about 2 000).

What am I doing wrong? I am a total beginner att both statistics and Stata so please excuse me if it is super obvious.


Thanks in advance!