agent dunham
2011-Feb-14 15:35 UTC
[R] Error en lm.fit NA/NaN/Inf en llamada a una función externa
Hello, I am new with R, and I'm trying to fit a linear model, I did the following and obtein this result, can anybody help? Thanks,> logdftodos7925vi <- log(dftodos7925vi) > logALTURA7925<- log(dftodos7925$ALTURA7917)> logtodos7925.lm <- lm (logALTURA7925~., data= logdftodos7925vi)Error en lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf en llamada a una funci?n externa (arg 1) -- View this message in context: http://r.789695.n4.nabble.com/Error-en-lm-fit-NA-NaN-Inf-en-llamada-a-una-funcion-externa-tp3305201p3305201.html Sent from the R help mailing list archive at Nabble.com.
Uwe Ligges
2011-Feb-15 14:22 UTC
[R] Error en lm.fit NA/NaN/Inf en llamada a una función externa
On 14.02.2011 16:35, agent dunham wrote:> > Hello, I am new with R, and I'm trying to fit a linear model, I did the > following and obtein this result, can anybody help? Thanks, > >> logdftodos7925vi<- log(dftodos7925vi) >> logALTURA7925<- log(dftodos7925$ALTURA7917) > >> logtodos7925.lm<- lm (logALTURA7925~., data= logdftodos7925vi) > Error en lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : > NA/NaN/Inf en llamada a una funci?n externa (arg 1)I guess you apply log() on a zero, i.e. you get a -Inf in your data and that cannot be used in any appropriate way within lm(). Uwe Ligges