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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Wong David
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


______________________________________________
[hidden email] 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.

Data analysis result - tourism eg CC excl IM (30 Nov.18).txt (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Jim Lemon-4
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 <[hidden email]> 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
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.