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

Jim Lemon drjimlemon @ending from gm@il@com
Sat Dec 1 10:42:24 CET 2018


Hi david,
The formatting of the data frame looks like the Province and Year
columns have gotten stuck together. This probably has something to do
with your Excel spreadsheet or the function that you are using to read
it in. If there is are fewer column names than columns, this error is
likely to happen. As your data did not get through, this is a guess,
but it might help.

Jim

On Sat, Dec 1, 2018 at 1:15 AM Wong David <david-wong912 using hotmail.com> wrote:
>
> 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
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list