R-beta: a bug in the lm function ?

Kung-Sik Chan kchan at stat.uiowa.edu
Fri Dec 19 17:50:58 CET 1997


I ran a function called BoxCox, taken from the book by Venables and
Ripley, for checking the need for power transformation. This function
works fine using the version 0.50 of R, but gives an error message
with version 0.60.

The lm function in version 0.60 is different from that in version 0.50.

Is there a bug in the new lm function?

Kung-Sik Chan

>  BoxCox(lm(log.O2UP~BOD+TKN+TS+TVS+COD,data=alr222a))
Error in terms.default(formula, data = data) : unused argument to function
> traceback()
[1] "terms.default(formula, data = data)"                              
[2] "lm(model, ...)"                                                   
[3] "BoxCox(lm(log.O2UP ~ BOD + TKN + TS + TVS + COD, data = alr222a))"

> BoxCox(lm(log.O2UP~BOD+TKN+TS+TVS+COD,data=alr222a))
Error in terms.default(formula, data = data) : unused argument to function
> lm(log.O2UP~BOD+TKN+TS+TVS+COD,data=alr222a)
> BoxCox(lm(log.O2UP~BOD+TKN+TS+TVS+COD,data=alr222a))
Error in terms.default(formula, data = data) : unused argument to function


> lm(log.O2UP~BOD+TKN+TS+TVS+COD,data=alr222a)
Call:
lm(formula = log.O2UP ~ BOD + TKN + TS + TVS + COD, data = alr222a)

Coefficients:
  (Intercept)           BOD           TKN            TS           TVS 
-1.776735e+00  3.245189e-05  1.020862e-03  1.560704e-04  6.631681e-03 
          COD 
 5.859737e-05 


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list