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

2011-04-28 Thread Greg Snow
Another way to see your plots is the TkPredict function in the TeachingDemos package. It will default the variables to their medians for numeric predictors and baseline level for factors, but then you can set all of those to something more meaningful one time using the controls, then cycle

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 way to do

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 pda...@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

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

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

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