我正在尝试使用sjPlot
包中的plot_models函数来绘制估算值,但是我想为我的方面提供free_x。我尝试将plot_models
函数中的代码编辑为p + facet_grid(~group,scales = "free_x")
,但是出现以下错误:
Error: Column 6 must be named.
Use .name_repair to specify repair.
Call `rlang::last_error()` to see a backtrace
代码:
library(sjPlot)
data(efc)
# fit three models
fit1 <- lm(barthtot ~ c160age + c12hour + c161sex + c172code,data = efc)
fit2 <- lm(neg_c_7 ~ c160age + c12hour + c161sex + c172code,data = efc)
fit3 <- lm(tot_sc_e ~ c160age + c12hour + c161sex + c172code,data = efc)
mod.plot <- plot_models(fit1,fit2,fit3,grid = TRUE)
mod.plot
是否可以为scale = free_x
设置mod.plot
?