I trying out the plm package for some first difference estimation in R. As stated in the title I wonder how I can turn my POSIX dates like "2002-10-01" into values that are understood by plm's time index. I guess this means using integer values?
Here's what I tried so far:
panel.fd <- plm(y~X,index=c("datefield","id"),model="fd",data=z)
# returns
Error in pdim.default(index[[1]], index[[2]]) :
# when I convert my datefield to a factor, I get the same error...
z$t_idx <-as.factor(z$datefield)