I'm tiring to plot the output of a model using the sjPlot
package. I want the standard errors on the plot to reflect the clustered standard errors I'm using in my model. I was wondering what the appropriate call for the plot_model
function is if I want to cluster my standard errors on c
in the plot of the predicted values?
set.seed(1999)
c <- sample(c("A","B", "C", "D"), size = 100, replace = T)
w <- sample(1:100, size = 100, replace = T)
x <- sample(1:100, size = 100, replace = T)
y <- sample(1:100, size = 100, replace = T)
df <- data.frame(x,y,w,c)
Results <- lm(y ~ x*w, data = df)
library(sjPlot)
library(ggplot2)
plot_model(Results, type = "pred", terms = c("x","w"))