【发布时间】:2018-12-19 15:55:11
【问题描述】:
据我了解,标准化系数可以用作效应大小的指标(可以使用 Cohen 1988 等经验法则)。我还了解到标准化的系数是expressed in terms of standard deviation,这使得它们相对接近于科恩的 d。
我还了解到,获得标准化系数的一种方法是预先对数据进行标准化。另一种是使用MuMIn 包中的std.coef 函数。
这两种方法在使用线性预测器时是等效的:
library(tidyverse)
library(MuMIn) # For stds coefs
df <- iris %>%
select(Sepal.Length, Sepal.Width) %>%
scale() %>%
as.data.frame() %>%
mutate(Species = iris$Species)
fit <- lm(Sepal.Length ~ Sepal.Width, data=df)
round(coef(fit), 2)
round(MuMIn::std.coef(fit, partial.sd = TRUE), 2)
在这两种情况下,系数都是-0.12。我将其解释如下:Sepal.Width 每增加 1 个标准差,Sepal.Length 就会减少其 SD 的 0.12。
然而,这两种方法给出了不同的结果和分类预测器:
fit <- lm(Sepal.Length ~ Species, data=df)
round(coef(fit), 2)
round(MuMIn::std.coef(fit, partial.sd = TRUE), 2)
与 setosa(截距)相比,versicolor 的效果分别为 1.12 和 0.46。
我应该相信哪个能够说“versicolor 和 setosa 之间的区别是 ... Sepal.Length 的 SD”?非常感谢
【问题讨论】:
标签: r regression linear-regression effect