1

I am fitting a 2-level model in R using lme4 for a dataset with multiple election surveys. Im using household income by quintile (ordinal, 5 categories) to predict an outcome variable on the individual level, with individuals nested in survey years.

lmer1 <- lmer(y ~ household_income + (household_income|year), data=df)

I want a plot with household income on the x axis (the 5 quintiles), with a different line for each country fitted in the plot.

I am not very well versed in ggplot2, any advice would be appreciated

roeljb
  • 11
  • 1
  • 1
    Where is country in your model? Are trying to plot the data, or plot the predictions from the model? Please give a reproducible example showing what you have and what you are trying to achieve. – Melissa Key Apr 14 '18 at 17:09

0 Answers0