[R] aov and data behind plots

Jason Turner jasont at indigoindustrial.co.nz
Sun Sep 21 18:28:25 CEST 2003


On Mon, 2003-09-22 at 00:57, Monica Palaseanu-Lovejoy wrote:

> Now i have a question relating "aov". When i use aov i end up with 
> 4 plots. How do i "see" the data behind those plots? I know about 
> summary - but this gives me only some statistical info. 

There's more than one (very different) answer to that question; it
depends what you mean by "the data behind those points".

The functions fitted(), resid(), cooks.distance(), and qqnorm() are all
handy functions, used by those plots.  coef() is also quite useful, as
is dummy.coef().

Failing that, have you tried str(your.aov.object)?  This gives a
detailed summary of each object element.  str(summary(your.aov.object))
might also be helpful.  Be careful about picking out object components
directly, however; if a nice, pre-packaged generic function exists to do
the job you want, it's much better to use that, rather than depend on
the internal object structure never changing.

> Also, if i 
> want to identify which of my set of values gives a certain segment 
> of the plot - how do i identify these values? 

See the help pages for locator() and identify().  The tricky bit for you
is making the four plots appear separately.  plot.lm() is the function
that makes those four plots; pick through it to find what you want.

Cheers

Jason
-- 
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
+64-(0)21-343-545




More information about the R-help mailing list