[R] Cook-distance-type plot (vertical bars)

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Aug 28 19:13:26 CEST 2003


On Thu, 28 Aug 2003, Frank Gibbons wrote:

> Hi,
> 
> Figure 13 of Emmanuel Paradis's "R for Beginners" was produced by termplot 
> working on an aov object. The lower right-hand plot is labelled "Cook's 
> distance plot", and I'd really like to produce a similar type of figure, 
> but in a totally different context. (I'm not even sure what this kind of 
> figure is called, perhaps an "impulse plot", where instead of a point at 
> (x,y), there's a vertical bar running from the x-axis up to where the point 
> would be).

Often called an `index plot'.  It's done by plot(type="h").  R seems to
think that is `histogram-like', but the notation comes from S which calls
it `high-density lines'.  I've never found either intuitive notation.

> Can anyone give me pointers on where to look for more info. I've had a look 
> in the places I could think of (plot.lm.R, termplot.R, plot.R, aov.R), and 
> couldn't find anything. Maybe I overlooked it?

I suspect it was done by plot.lm(which=4), which does an index plot of 
Cook's distance.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list