R-beta: formula() and model formulae
Peter Dalgaard BSA
p.dalgaard at kubism.ku.dk
Tue May 6 18:17:15 CEST 1997
Mike Meyer <mikem at 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 at 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 at stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
More information about the R-help
mailing list