Re: [S] SUMMARY ADDENDUM: How to replace formal name with value in call

Prof Brian D Ripley (
Wed, 5 Aug 1998 08:44:15 +0100 (BST)

On Tue, 4 Aug 1998, Terry Elrod wrote:

> Since posting my summary, I received additional suggestions that do not
> involve eval or, but instead fix up the value returned by the called
> function (au) from within the calling function ( The cited
> advantage is the avoidance of the overhead of calls to eval (directly or
> from within, which can build up over many iterations within a
> function like step.

How do you think update works? That uses eval, and with much bigger frames
than involved in my use of Incidentally, my preferred (and first)
solution was to write a special-purpose update method, and that is using
the direct substitution route, rather more elegantly IMHO.

So you may wish to avoid eval(), but tackle the big target first. However,
I have run extensive stepwise-selection studies of complicated things
(multiply averaged neural net fits, for example) without problems. The
additional overhead of stepAIC (that uses update) over step.glm (that does
not) in memory seems minimal. (stepAIC is slower, but that is the price
that must be paid for computing the correct solution. A stripped-down
version a la step.glm is perhaps 10% faster than stepAIC.)

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

----------------------------------------------------------------------- This message was distributed by To unsubscribe send e-mail to with the BODY of the message: unsubscribe s-news