From ripley at stats.ox.ac.uk  Sat Oct 29 08:17:57 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sat, 29 Oct 2005 07:17:57 +0100 (BST)
Subject: [Rd] model.response() as a generic function?
In-Reply-To: <Pine.LNX.4.44.0510282028280.5529-100000@wws-6qcbw21.Princeton.EDU>
References: <Pine.LNX.4.44.0510282028280.5529-100000@wws-6qcbw21.Princeton.EDU>
Message-ID: <Pine.LNX.4.61.0510290713140.2665@gannet.stats>

There is a considerable difference: model.response is documented to work 
on a model frame.  Why does model.response(model.frame(object))) not work 
in the generality you need?

Please give us some examples of why you are trying to do, and how you 
would envisage a generic model.response being documented.  (It is 
currently documented as equivalent to model.extract(,"response").)

On Fri, 28 Oct 2005, Kosuke Imai wrote:

> Dear R contributors,
>  Gary King, Olivia Lau (both at Harvard) and I are working on an R
> package where we are trying to write functions equivalent to
> model.frame(), model.matrix(), and model.response() for multiple equations
> models (i.e., models that require the specification of multiple formulae).
> However, we noticed that while model.frame() and model.matrix() are
> generic functions, model.response() is not. It would be nice if
> model.response() is also a generic function so that we can make use of the
> same function name for a large class of models we are working on. Is there
> any possibility that this change can be made in the future version of R?
> Thank you very much for your consideration in advance,
> Kosuke

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



[Rd] model.response() as a generic function?
Prof Brian Ripley