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

Millo Giovanni Giovanni_Millo at Generali.com
Tue Nov 22 13:13:50 CET 2011

Hello Manuel.

Yes please, would you send me the data to reproduce the example? Else I
cannot tell, although this error is typical of undefined logs (zero or
negative argument).

Two general observations, for now:
- inserting special characters like '*' in variable names is looking for
- a good first step in diagnosing 'plm' errors is always to check the
same specification (formula+data) on lm()

Please remember to exclude the r-help list from the reply containing the
dataset. I will treat it with confidentiality.

Let me know

Giovanni Millo, PhD
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 4,
34132 Trieste (Italy)
tel. +39 040 671184
fax  +39 040 671160

-------------- original message ----------------

Message: 17
Date: Mon, 21 Nov 2011 04:33:13 -0800 (PST)
From: ManuelS <steiner-manuel at web.de>
To: r-help at r-project.org
Subject: [R] Problems using log() in a plm() regression.
Message-ID: <1321878793485-4091377.post at n4.nabble.com>
Content-Type: text/plain; charset=us-ascii

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
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
log() from *RD*. The log of *I_EQON* on the other hand poses no problem.
dont quite get that cause there is no difference in the variables
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
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
know so i can send them to you personally.

Thank you in advance.

View this message in context:
Sent from the R help mailing list archive at Nabble.com.

------------ end original message ------------------

Ai sensi del D.Lgs. 196/2003 si precisa che le informazi...{{dropped:12}}

More information about the R-help mailing list