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

From: peter dalgaard <pdalgd_at_gmail.com>
Date: Wed, 27 Apr 2011 09:55:55 +0200

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.

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes_at_cbs.dk  Priv: PDalgd_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 - 07:58:41 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