0

I am new to R and this is probably a stupid question, but i've been trying to run a random Effects Panel Regression with self collected Data of Communityears, political Engagement = Y and a Treatment = X. Over a time Sequence of 9 Years. Whenever I try to do the Regression and create the communityyear Index this error Message comes up:

model.pooling = plm(polit.Engagement_k ~ JMW_k + AG$X1 + AG$x2 + AG$X3 + AG$X4 + AG$X5 + AG$X6, 
                    data=AG_D,index = c("AG_D$Gemeinde", "Jahr"),   model="pooling")

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

I have already converted the csv. file with BOM (by means of Notepoad++) into a csv. file without BOM and through colnames. I found out that the Variable exists.

  1. What is the Individual Index?
  2. Do you have any Idea how to solve this?

Thank you very much for your answers.

Roland
  • 127,288
  • 10
  • 191
  • 288
F.KA
  • 9
  • 1
  • 2
    Welcome to StackOverflow! Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – Sotos Jun 04 '18 at 06:41
  • Why do you include the data frame in your index? What is the difference between `AG_D$Germeinde` and `Jahr`? – Kevin Arseneau Jun 04 '18 at 06:50
  • 1
    Use `c("Gemeinde", "Jahr")` instead, `plm` already knows your data. First is individual index, second is time index. You should also define `model="random"`, otherwise you'd be calculating a pooled OLS. – jay.sf Jun 04 '18 at 07:58

0 Answers0