Re: [R] the rationale for using update()

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 19 May 2005 - 03:32:20 EST

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@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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu May 19 03:37:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:50 EST