[R] Question for LM intercept

Pavlidis, Efthymios e.pavlidis at lancaster.ac.uk
Thu Jul 13 16:02:29 CEST 2006


Hello,

I am having the following silly problem with lm. 

Let X be a dataframe with  X[,1] the dependent variable and X[,-1] the independent variables. I want to run the following
but without including an intercept.

for(i in 1:100 ){
    lm( X[,100-i] )  # this works fine but it returns an intercept
}

Can anyone help me? Thank you in advance!


Regards,
Themis



More information about the R-help mailing list