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

Prof Brian D Ripley (ripley@stats.ox.ac.uk)
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 do.call, but instead fix up the value returned by the called
> function (au) from within the calling function (step.au). The cited
> advantage is the avoidance of the overhead of calls to eval (directly or
> from within do.call), 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 do.call. 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,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
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 s-news@wubios.wustl.edu. To unsubscribe send e-mail to s-news-request@wubios.wustl.edu with the BODY of the message: unsubscribe s-news