From pdalgd at gmail.com  Wed Apr 27 09:55:55 2011
From: pdalgd at gmail.com (peter dalgaard)
Date: Wed, 27 Apr 2011 09:55:55 +0200
Subject: [Rd] Wish R Core had a standard format (or generic function)
	for "newdata" objects
In-Reply-To: <4DB765DD.3060900@gmail.com>
References: <BANLkTikCjqUM9YJhYtgLh4Q-z=0mpmgp2A@mail.gmail.com>
	<4DB765DD.3060900@gmail.com>
Message-ID: <4B37D9F9-B5A5-4B35-BEFF-03F89D45EFE0@gmail.com>


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



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