Analysis of Covariance Plots
Analysis of Covariance Plots. Any of the ancova modelsy ~ x * t
y ~ t * x
y ~ x + t
y ~ t + x
y ~ x , groups=t
y ~ t, x=x
y ~ x * t, groups=b
y ~ t * x, groups=b
y ~ x + t, groups=b
y ~ t + x, groups=b
ancovaplot(object, ...) ## S3 method for class 'formula' ancovaplot(object, data, groups=NULL, x=NULL, ..., formula=object, col=rep(tpg$col, length=length(levels(as.factor(groups)))), pch=rep(c(15,19,17,18,16,20, 0:14), length=length(levels(as.factor(groups)))), slope, intercept, layout=c(length(levels(cc)), 1), col.line=col, lty=1, superpose.panel=TRUE, between=if (superpose.panel) list(x=c(rep(0, length(levels(cc))-1), 1)) else list(x=0), col.by.groups=FALSE ## ignored unless groups= is specified ) panel.ancova.superpose(x, y, subscripts, groups, slope, intercept, col, pch, ..., col.line, lty, superpose.panel, col.by.groups, condition.factor, groups.cc.incompatible, plot.resids=FALSE, print.resids=FALSE, mean.x.line=FALSE, col.mean.x.line="gray80")
formula, object |
|
data |
|
groups |
If the treatment factor is included in the |
x |
Covariate. Required by For |
... |
Other arguments to be passed to |
col, pch |
Standard lattice arguments. |
slope, intercept |
Vector, the length of the number of treatment levels, containing slope
and intercept of the |
layout, between |
Standard lattice arguments. |
col.line, lty |
Standard lattice arguments. By default, they follow the value of the
treatment factor in the |
y, subscripts |
See |
superpose.panel |
logical. if |
col.by.groups |
logical. See the discussion in argument |
condition.factor, groups.cc.incompatible |
These are both internal variables. |
plot.resids, print.resids, mean.x.line, col.mean.x.line |
logical, logical, logical or numeric, color name.
When |
ancova=aov specification
|
xyplot specification |
abline |
|
y ~ x * t
|
y ~ x | t, groups=t |
lm(y[t] ~ x[t]) |
## separate lines |
y ~ t * x
|
y ~ x | t, groups=t |
lm(y[t] ~ x[t]) |
## separate lines |
y ~ x + t
|
y ~ x | t, groups=t |
lm(y ~ x + t) |
## parallel lines |
y ~ t + x
|
y ~ x | t, groups=t |
lm(y ~ x + t) |
## parallel lines |
y ~ x , groups=t
|
y ~ x | t, groups=t |
lm(y ~ x) |
## single regression line |
y ~ t, x=x
|
y ~ x | t, groups=t |
mean(t) |
## separate horizontal lines |
y ~ x * t, groups=b
|
y ~ x | t, groups=b |
lm(y[t] ~ x[t]) |
## sep lines, pch&col follow b |
y ~ t * x, groups=b
|
y ~ x | t, groups=b |
lm(y[t] ~ x[t]) |
## sep lines, pch&col follow b |
y ~ x + t, groups=b
|
y ~ x | t, groups=b |
lm(y ~ x + t) |
## par lines, pch&col follow b |
y ~ t + x, groups=b
|
y ~ x | t, groups=b |
lm(y ~ x + t) |
## par lines, pch&col follow b
|
ancovaplot
returns a c("ancova","trellis")
object.
panel.ancova.superpose
is an ordinary lattice panel
function.
Richard M. Heiberger <rmh@temple.edu>
Heiberger, Richard M. and Holland, Burt (2015). Statistical Analysis and Data Display: An Intermediate Course with Examples in R. Second Edition. Springer-Verlag, New York. https://www.springer.com/us/book/9781493921218
See the older ancova
.
data(hotdog, package="HH") ancovaplot(Sodium ~ Calories + Type, data=hotdog) ancovaplot(Sodium ~ Calories * Type, data=hotdog) ancovaplot(Sodium ~ Calories, groups=Type, data=hotdog) ancovaplot(Sodium ~ Type, x=Calories, data=hotdog) ## Please see demo("ancova", package="HH") to coordinate placement ## of all four of these plots on the same page. ancovaplot(Sodium ~ Calories + Type, data=hotdog, plot.resids=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.