To: Mike Meyer <mikem@stat.cmu.edu> Subject: Re: R-beta: formula() and model formulae From: Peter Dalgaard BSA <p.dalgaard@kubism.ku.dk> Date: 06 May 1997 18:17:15 +0200 In-Reply-To: Mike Meyer's message of Tue, 06 May 1997 11:21:39 -0400 Message-Id: <x2d8r4shh0.fsf@bush.kubism.ku.dk> Mike Meyer <mikem@stat.cmu.edu> writes: > > 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) Yep. Seems that we need a formula.lm<-function(x)formula(x$terms) > > 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, We had that topic a while back. I think it was concluded that it is a feature, because mixing model formulas and arithmetic ditto is bad practice. (I don't have any strong feeling about this, personally. As long as R won't introduce those awful Helmert contrasts as default...) -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=