[R] Problems using log() in a plm() regression.

ManuelS steiner-manuel at web.de
Mon Nov 21 13:33:13 CET 2011

hey guys

I have a panel data set that i want to perform some regressions on. I am
using the /plm/ package.
I defined a model in the following way:

PWBw.pool <- plm(*PWB* ~ log(*I_EQON*) + log(*RD*) + ... + *PAGRI*,
data = pfem, na.action=na.exclude, model="pooling")

When i run this it gives the following error (the error remains when i use
other model = "" specifications like "within" or "random"):

/Fehler in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
  NA/NaN/Inf in externem Funktionsaufruf (arg 1) /

The translation would be something like:

/Error in lm.fit(x,y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in external fuction call (arg 1)/

This error disappears and the regression work perfectly when i remove the
log() from *RD*. The log of *I_EQON* on the other hand poses no problem. I
dont quite get that cause there is no difference in the variables *I_EQON*
and *RD*:
They have:
1.) the same number of variables
2.) both NA's so that cant be it
3.) class: "numeric"

When performing /log() /on the variable *RD* simply like this (not within
the plm command): log(pfem$*RD*) everything works out fine which in my
opinion indicates that the problem is related to the/ plm()/ function.

Anyone any advise? If u need the data to run the regression please let me
know so i can send them to you personally.

Thank you in advance.

View this message in context: http://r.789695.n4.nabble.com/Problems-using-log-in-a-plm-regression-tp4091377p4091377.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list