I have the following error code: duplicate couples (id-time) in resulting pdata.frame when I want to create my panel data.
I already know that there are sometimes two duplicate couples but I just don't know how to fix it? Anyone an idea?
pdata <- pdata.frame(TestTable, index= c("id","date"))
table(index(pdata), useNA = "ifany")
we see that on some dates there are two couples → between 0 and 2
View(table(index(pdata), useNA = "ifany"))
check again if duplicate couples exist --> TRUE
any(table(index(pdata), useNA = "ifany") > 1)