Skip to content
Prev 141225 / 398498 Next

predict.lm() question

You called lm() with a predictor named ``D$X'' and called predict.lm()
with a predictor name ``X''.

Simplest remedy:  Use

	fit <- lm(Y ~ X, data = D)

Remark:  Not a good idea to use ``D'' as the name of your data frame  
(``D'' is
the name of a function --- derivative).  Likewise don't use ``lm'' as  
the name
of an object (result of fitting a model) --- ``lm'' is the name of a  
function,
as well you know!

No immediate harm will come, but there can be subtle consequences I  
believe,
and anyhow it's confusing.

		cheers,

			Rolf Turner
On 8/04/2008, at 9:57 AM, Chip Barnaby wrote:

            
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}