R 中的 Eta/Eta 平方例程
除了在应用 GLM 系列的某些技术之前使用的线性度图形估计(凝视散点图方法)之外,还有多种方法可以通过算术进行此估计(即无需图形)。
现在,我将重点关注 Fisher 的 eta 平方 - 相关比:从算术上讲,它等于 Pearson 的平方 r(决定系数:r2)如果两个变量之间的关系是线性的。因此,您可以比较 eta 和 r 的值并对关系类型(线性或非线性)进行评估。它提供有关由自变量解释(线性或非线性)的因变量方差百分比的信息。因此,您可以在不满足线性假设时应用它。
简单地说:R 中有 eta/eta-squared 的例程吗?
Apart from graphical estimation of linearity (gaze-at-scatterplot method), which is utilized before applying some technique from GLM family, there are several ways to do this estimation arithmetically (i.e. without graphs).
Right now, I'll focus on Fisher's eta-squared - correlation ratio: arithmetically, it's equal to squared Pearson's r (coef. of determination: r2) if relationship between two variables is linear. Hence, you can compare values of eta and r and make an assessment about type of relation (linear or not). It provides an information about percent of variance in the dependent variable explained (linearly or not) by the independent variable. Therefore, you can apply it when linearity assumptions are not met.
Simply stated: is there a routine for eta/eta-squared in R?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我仍然很震惊,我必须承认...在
R
中没有简单直接的方法来计算 η 或 η2...所以我根据到维基百科页面。这里是:所以这产生了另一个问题,我很快就会发布......你用什么来检查线性度?但是,我无法计算 p 值,所以如果有人知道该怎么做...请告诉我!
I'm still quite stunned, I must admit... there's no easy and straightforward way for calculating η or η2 in
R
... So I wrote a function according to Wikipedia page. Here goes:So this yields another question, which I'm about to post shortly... what do you use to check linearity? However, I can't calculate p-values, so if anyone knows how to do it... please, let me know!
阅读此问题并尝试答案中的功能后,我发现这是
库“sjstats”。
包含一个 Eta 平方函数。
也许这对未来的寻求者有帮助。
After reading this Question, and trying the function in the answer, I just found this the
library "sjstats".
There is an Eta-Squared-function included.
Maybe it is helpful for future seekers.