[R] add1 in glm
Murray Jorgensen
maj at stats.waikato.ac.nz
Tue Nov 5 21:10:09 CET 2002
ripley at stats.ox.ac.uk wrote:
> On Tue, 5 Nov 2002, Murray Jorgensen wrote:
>
>
>>I'm having a bit of difficulty using the stepwise model-building tools
>>in a glm context. Here, for example is one problem I have had using
>>add1, where the abbreviation "." does not work as I expected it to do. I
>
>
> What did you expect? `.' means `what is already there' in updating a
> formula, so you asked for nothing to be added. The help page says
>
> scope: a formula giving the terms to be considered for adding or
> dropping.
>
> and that seems precise to me.
Well I based it on my interpretation of the beginning of the first
example in the V&R discussion, also the first example in the stepAIC() page:
data(quine)
quine.hi <- aov(log(Days + 2.5) ~ .^4, quine)
This seemed to suggest that "." meant "all the predictors". Now that I
know what "." means, my error is clear.
Does anyone know of functions for adding the best single term (or
dropping the worst) from a specified scope? (Respecting marginality, of
course!)
Murray
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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