Problem with plm package

Hi, I want to run a simple fixed effect with multiple variables but am struggeling because it keeps showing me the following error:

Error in pdata.frame(data, index) : 
  variable pid does not exist (individual index)

Here ist my code, maybe someone can help me:

within = plm(gh_nsb ~ kinderanz + educ + netto + migfilter + migback + arefback, factor(syear),  data="df.Final", index = c("pid", "syear"), modell="within")

unfortunatly I can't offer the dataset because it is quiet big.

Thanks in advance!

is there a column in your dataset called pid ?
What you shared implies there isn't, even though you wrote code that relies on that.

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 :

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.