Yes, there is a column that is called pid, as well as a column called syear, and all the other ones integrated in the code. That is why I am confuesed, I also double checked multiple times that I defined the right data frame, so it must be something else. Any ideas?
Theres a spelling mistake where you pass 'within' as parameter model, but have written modell=
but it would be strange that the error you quoted would relate, I would expect a different error.
If you can't figure it out from the two suggestions made so far, then perhaps you can invest a little more into turning your issue into a reprex. see the guide :