[Rd] Wish R Core had a standard format (or generic function) for "newdata" objects
Greg Snow
Greg.Snow at imail.org
Thu Apr 28 22:31:25 CEST 2011
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 through the predictors for the plots. It can also give you a command line version of the commands that you could then run, or loop through to get your plots.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at 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
> function) for "newdata" objects
>
> On Tue, Apr 26, 2011 at 7:39 PM, Duncan Murdoch
> <murdoch.duncan at gmail.com> 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 have given you for free, and demand they do it better.
> >
> > Duncan Murdoch
> >
>
> I offer sincere apology for sounding that way. I'm not attacking
> anybody. I'm just talking, asking don't you agree this were
> standardized. And you disagree, and I respect that since you are
> actually doing the work.
>
> >From a "lowly user's point of view", I wish "you experts" out there
> would tell us one way to do this, we could follow your example.
>
> When there's a regression model fitted with 20 variables in it, and
> half of them are numeric, 4 are unordered factors, 3 are ordinal
> factors, and what not, then this is a hard problem for many of us
> ordinary users. Or it is tedious. They want "keep everything fixed,"
> except one variable that takes on different specified values. And
> they want to do that for every variable, one at a time.
>
> Stata has made this easy for many models, R could as well, if we
> coalesced on a more-or-less standard way to create newdata objects for
> predict.
>
> But, in the end, I agree with your sentiment. I just have to do this,
> show you it is handy. I think Zelig's setx has it about right, I'll
> pursue that strategy.
>
> pj
> --
> Paul E. Johnson
> Professor, Political Science
> 1541 Lilac Lane, Room 504
> University of Kansas
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
More information about the R-devel
mailing list