Skip to content
Prev 169974 / 398506 Next

Putting values and axis X labels on the charts based on allEffects

Dear Dimitri,
On
on
Just to be clear, what you're getting is a plot of predicted values of Y at
levels of A (or values of A, depending upon whether A is a factor or
numeric), holding B constant at its mean (or proportional distribution in
the data, depending upon whether B is numeric or a factor). Similarly for B
given A.
Yes, it's possible, but you'd have to make a custom graph to do it.
allEffects() returns a list of effect objects corresponding to the
high-order terms of the model (here A and B), each of which contains all of
the information you need to make the plot. To see what's there, try, e.g.,
str(ml.eff); to see the effect object for A, try str(m1.eff[["A"]]).
Do you mean more predictors than 2? In any event, to customize the main
title, you'd have to make the plots individually. You could automate this,
however, by a loop, looping over names(m1.eff).

More generally, the plot methods for effect objects try to behave reasonably
and to provide reasonable flexibility but aren't really meant to produce
publication-quality graphs.

I hope this helps,
 John
http://www.R-project.org/posting-guide.html