I have been forming a panel dataset based on many other panel datasets. I have been puzzled by data.table
or even base R function merge()
that often alter the ordering of rows. So after much trial and error I used the following from plyr
:
join(x, y, by=c("Firm", "Index"))
Finally, when I prepared by final panel dataset and used the attach()
function and plm
package for the analysis, I get the following error:
Error in pdim.default(index[[1]], index[[2]]) when I investigate further using
options(error=recover)
I find
stop(cat("duplicate couples (time-id)\n"))
Kindly suggest what could be wrong and how to fix it?