Re: [Rd] Wish R Core had a standard format (or generic function) for "newdata" objects

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed, 27 Apr 2011 06:46:54 -0400

On Wed, Apr 27, 2011 at 3:55 AM, peter dalgaard <pdalgd_at_gmail.com> wrote:
>
> On Apr 27, 2011, at 02:39 , Duncan Murdoch wrote:
>
>> On 26/04/2011 11:13 AM, Paul Johnson wrote:
>>> Is anybody working on a way to standardize the creation of "newdata"
>>> objects for predict methods?
>
> [snip]
>
>>> I think it is time the R Core Team would look at this tell "us" what
>>> is the right way to do this. I think the interface to setx in Zelig is
>>> pretty easy to understand, at least for numeric variables.
>>
>> If you don't like the way this was done in my three lines above, or by Frank Harrell, or the Zelig group, or John Fox, why don't you do it yourself, and get it right this time?  It's pretty rude to complain about things that others have given you for free, and demand they do it better.
>
> Er... No, I don't think Paul is being particularly rude here (and he has been doing us some substantial favors in the past, notably his useful Rtips page). I know the kind of functionality he is looking for; e.g., SAS JMP has some rather nice interactive displays of regression effects for which you'll need to fill in "something" for the other variables.
>
> However, that being said, I agree with Duncan that we probably do not want to canonicalize any particular method of filling in "average" values for data frame variables. Whatever you do will be statistically dubious (in particular, using the mode of a factor variable gives me the creeps: Do a subgroup analysis and your "average person" switches from male to female?), so I think it is one of those cases where it is best to provide mechanism, not policy.
>

That could be satisfied by defining a generic in the core of R without any methods. Then individual packages or analyses could provide those in the way they see fit. As long as the packages or analyses are working with objects of different classes they would not conflict.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 27 Apr 2011 - 10:55:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Apr 2011 - 14:00:52 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive