how can i define a panel data with multiple observations for the same year - student
What keeps you from doing -xtset St_ID Ano- is that in each student-year combination you have multiple observations, distinguished by the variable Disciplina. I don't know if there are other variables in your real data set. I imagine there are, and I don't know what complications, if any, they will present for you. But if your data set consists of only the variables you have shown, you can do this:
Code:
by St_ID Ano, sort: gen _j = _n reshape wide Disciplina, i(St_ID Ano) j(_j) xtset St_ID Ano
Comment