1

Me and some friends need to 'upgrade' a GLM and LMER plot. we need to add the significance levels, change text size and legend position.

how do we do this in the "allEffectsplot"??

this is what we have now...

it needs to look somewhat like this graph (the right image is the correct one): [we need the graph looking like this one2]

aosmith
  • 34,856
  • 9
  • 84
  • 118
blondie
  • 61
  • 4
  • 1
    Please include code you used (including packages used) along with a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) in your question. – aosmith Dec 28 '15 at 18:08

1 Answers1

1

changing the position of the legend:
I just want to answer the question in case any other comes here and want to try what worked for me. I don't know which package the there is used to make the effect plot but I had the same problem and adding key.args = list(space="top")) to my code worked. To make the effect plot I used the effect package.

Here is an example of my code:

library(effects)
library(car)
library(MASS)
library(splines)
library(lattice)

plot(Effect(focal.predictors = c("income","age", "country"), 
    mod = mymodel, xlevels = list(age = 50:80), latent = TRUE),
  rug = FALSE, axes = list(grid = TRUE), multiline=TRUE, 
      colors = c("color1", "color2", "color3", "color4", "color5"), 
     lattice = list(layout = c(5,1), key.args = list(space="top")))

just add number of colors according how many categories you have. I had 5 categories of income, so I wrote name of 5 colors I liked. If you want the legend at the right side of the plot you can just write "right" instead of "top".

rr19
  • 79
  • 1
  • 9