【发布时间】:2020-08-22 06:37:47
【问题描述】:
我厌倦了使用sjPlot 包绘制模型的输出。我希望绘图上的标准误差能够反映我在模型中使用的聚集标准误差。我想知道如果我想在预测值图中将我的标准错误聚集在c 上,那么对plot_model 函数的适当调用是什么?
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"))
【问题讨论】:
-
在这种情况下,“集群”是什么意思?由什么聚类?
-
更新了问题以反映您的问题。我想将我的标准错误集中在
c。