Skip to content

Strange behaviour of lm

3 messages · Guido Masarotto, Peter Dalgaard

#
R-0.62.4 running under linux
-------------------------------------------------------------------------------
Error: length of namelist must equal dims
Call:
lm(formula = x ~ x)

Coefficients:
(Intercept)
          2
Call:
lm(formula = y ~ x)
	  
Coefficients:
(Intercept)            x
          0            1
	  
------------------------------------------------------------------------------
guido
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Guido Masarotto <guido@sirio.stat.unipd.it> writes:
That one is a bug...
...but the rest is Splus compatible. The dependent is removed from the
right hand side of model formulas. I seem to remember that there's a
reason for that.
#
Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:
.. which is now fixed for 0.63:
Call:
lm(formula = x ~ x)

Coefficients:
(Intercept)  
    -0.5668