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

2011-04-28 Thread Greg Snow
age- > From: r-devel-boun...@r-project.org [mailto:r-devel-bounces@r- > project.org] On Behalf Of Paul Johnson > Sent: Wednesday, April 27, 2011 10:20 AM > To: Duncan Murdoch > Cc: R Devel List > Subject: Re: [Rd] Wish R Core had a standard format (or generic > functio

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

2011-04-27 Thread Christophe Dutang
Among many solutions, I generally use the following code, which avoids the ideal average individual, by considering the mean across of the predicted values: averagingpredict <- function(model, varname, varseq, type, subset=NULL) { if(is.null(subset)) mydata <- model$data else

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

2011-04-27 Thread Paul Johnson
On Tue, Apr 26, 2011 at 7:39 PM, Duncan Murdoch wrote: > 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 ha

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

2011-04-27 Thread Gabor Grothendieck
On Wed, Apr 27, 2011 at 3:55 AM, peter dalgaard 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 tim

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

2011-04-27 Thread peter dalgaard
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

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

2011-04-26 Thread Duncan Murdoch
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? They're generally just dataframes. Use the data.frame() function. When using predict, I find it difficult/tedious to create newdata data frames when t

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

2011-04-26 Thread Paul Johnson
Is anybody working on a way to standardize the creation of "newdata" objects for predict methods? When using predict, I find it difficult/tedious to create newdata data frames when there are many variables. It is necessary to set all variables at the mean/mode/median, and then for some variables o