[R] the rationale for using update()

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 18 19:32:20 CEST 2005


On Wed, 18 May 2005, Thomas Lumley wrote:

> On Wed, 18 May 2005, Dimitri Joe wrote:
>
>> I wonder what is the rationale for using update(): just saving on typing, 
>> more efficiency, or something else?
>
> It saves on typing (and in particular on typing errors).  Methods for 
> "update" could be more efficient than fitting the model from scratch, but 
> typically are not.

I'd say readability was the most important reason.  In a 200-char call it 
is hard to see what you changed, but

update(fit, . ~ . -x5 + x6)
update(fit, method="ML")

are self-documenting.

-- 
Brian D. Ripley,                  ripley at 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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list