[R] Seek help - plm package (Error message: duplicate 'row.names' are not allowed)

Wong David d@vid-wong912 @ending from hotm@il@com
Fri Nov 30 14:31:22 CET 2018


Dear Madam/ Sir,

When I used the 'plm' package and import data into r last week, I found that everything was running smooth. However, when I used the 'plm' package today, I found the following error message:

> pdata <- pdata.frame(mydata, index=c("Province","Year"))
> pooling <- plm(Y~X, data=pdata,model="pooling")
Error in `row.names<-.data.frame`(`*tmp*`, value = c("Anhui-2006", "Anhui-2007",  :
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names':

I did not find out the above error message when running panel data regression over one year. Moreover, I attempted to manipulate the data many times in the excel data file, for example, deleting the duplicated row, and convert the data into csv file. The r program shows the same result. Please kindly advise as this problem has bothered for the whole day.

Enclosed is the data set and the respective result. Please kindly assist.

Thanks and regards,
David Wong


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Data analysis result - tourism eg CC excl IM (30 Nov.18).txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20181130/436d87bd/attachment.txt>


More information about the R-help mailing list