R-beta: formula() and model formulae

Mike Meyer (mikem@stat.cmu.edu)
Tue, 06 May 1997 11:21:39 -0400


Message-Id: <199705061521.LAA12884@desire.stat.cmu.edu>
To: r-testers <r-testers@stat.math.ethz.ch>
Subject: R-beta: formula() and model formulae
Date: Tue, 06 May 1997 11:21:39 -0400
From: Mike Meyer <mikem@stat.cmu.edu>

Several bugs (no solutions, yet).  These might be well known.

1) If one does, e.g.,  mymod <- lm(y ~ x); formula(mymod)
then one does not get back the formula (one gets, Error: invalid formula) 

2) if x is of mode numeric, then the model formula
	mymod <- lm(y ~ x + x^2)
is not processed as S would do it.    The model is fit ignoring the x^2 term, 
however mymod$call includes the x^2 term.  This seems to be a bug (or maybe 
feature) in applying model formulae operators to numeric quantities.  I expect 
(from experience with S) that x^2 will be interpreted as a math operator.  
Whatever the right thing to do is, it needs to be documented.

Regards,  --Mike

Mike Meyer, Department of Statistics, Carnegie Mellon University


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=