Skip to content
Back to formatted view

Raw Message

Message-ID: <47CC768D.20407@etu.unige.ch>
Date: 2008-03-03T22:07:09Z
From: Matthieu Stigler
Subject: How to include an externally defined NULL value in lm

Hello!

I would love to be able to include an external variable  to a lm call, I 
mean something:

if(TRUE)
    a<-freeny.x[,4]
else
    a<-NULL

lm(freeny.y~freeny.x[,-4] +a)

but it does not work with a<-NULL, whereas

lm(freeny.y~freeny.x[,-4] +NULL)

I don't understand why and did not find an answer in the manuals... do 
you see it? Any idea?

Thanks!!