如何更改Interact_plot()中的MOD2标签?
我有以下互动:
data(iris)
View(iris)
reg <- lm(Sepal.Length ~ Sepal.Width*Petal.Width*Petal.Length, data = iris)
我想创建一个图:
library(interactions)
interact_plot(reg, pred = Sepal.Width, modx = Petal.Width, mod2 = Petal.Length, data = iris, x.label = "Sepal Width", y.label = "Sepal Length", legend.main = c("Petal Width"), mod2.labels = c("Petal Length"))
问题是我似乎无法将图中的petal.length变量更改为使用mod2.labels
函数“花瓣长度”。 。任何指导将不胜感激。
I have the following interaction:
data(iris)
View(iris)
reg <- lm(Sepal.Length ~ Sepal.Width*Petal.Width*Petal.Length, data = iris)
I want to create a plot:
library(interactions)
interact_plot(reg, pred = Sepal.Width, modx = Petal.Width, mod2 = Petal.Length, data = iris, x.label = "Sepal Width", y.label = "Sepal Length", legend.main = c("Petal Width"), mod2.labels = c("Petal Length"))
The problem is that I can't seem to change the Petal.Length variable in my plot to "Petal Length" with the mod2.labels
function. Any guidance would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要通过一个完整标签的向量 - 每个方面一个:
You need to pass a vector of complete labels - one per facet: