[R] Problems using log() in a plm() regression.
Milan Bouchet-Valat
nalimilan at club.fr
Sun Jun 16 13:59:13 CEST 2013
Le dimanche 16 juin 2013 à 09:05 +0200, Guylaine NOUWOUE a écrit :
> Hello,
>
> I am performing a panel model and I have an error. In fact, I would like to
> set up the pooling model and I have an error message. Any help
>
> >pool<plm(panel$lexportijt~ldistit+lpopit+lpopjt+lpibit+lpibjt+lpibcit+lpibc
> jt+langueij+histoireij+infrasij+frontiereij+simijt+enclaviit,data=panel,inde
> x=c("origine","annee"))
>
> Erreur dans parse(text = x) :
>
> fin d'entre inattendu(e) dans "panel$lexportijt ~ ldistit + lpopit +
> lpopjt + lpibit + lpibjt + lpibcit + lpibcjt + langueij + histoireij +
> infrasij + frontiereij + simijt + enclaviit + + "
This is not a problem with log() at all... this is a mere syntax error.
First, there is no need to repeat "panel$" since you specify a data
argument. Second, I think you should add more spacing and line breaks to
your code to make it readable.
Finally, the real bug is that you typed "<" instead of "<-". I think you
should read an introduction to the R language.
This should do what you want :
pool <- plm(lexportijt ~ ldistit + lpopit + lpopjt + lpibit + lpibjt + lpibcit
+ lpibcjt + langueij + histoireij + infrasij + frontiereij
+ simijt + enclaviit,
data=panel, index=c("origine", "annee"))
Regards
More information about the R-help
mailing list