Discussion:
[R] Seek help - plm package (Error message: duplicate 'row.names' are not allowed)
Wong David
2018-11-30 13:31:22 UTC
Permalink
Dear Madam/ Sir,
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
Jim Lemon
2018-12-01 09:42:24 UTC
Permalink
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
Post by Wong David
Dear Madam/ Sir,
pdata <- pdata.frame(mydata, index=c("Province","Year"))
pooling <- plm(Y~X, data=pdata,model="pooling")
duplicate 'row.names' are not allowed
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
______________________________________________
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.
______________________________________________
R-***@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.
Loading...