- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经在 R 上尝试了一段时间,但我似乎无法提取用于 levene 测试的 p 值(“Pr(>f) 的值)”。对 R 进行统计测试的常用方法是在测试命令末尾加上 $p.value。然而,这似乎不适用于 Levene 测试,如下所示:
> leveneTest(all.vec,factors)
Levene's Test for Homogeneity of Variance (center = median)
Df F value Pr(>F)
group 3 8.9261 6.982e-06 ***
2607
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> leveneTest(all.vec,factors)$p.value
NULL
此外,对于 jarque bera 测试,我无法以类似的方式提取 p.value
> jarque.bera.test(lg.day.ret.vec)
Jarque Bera Test
data: lg.day.ret.vec
X-squared = 63087.83, df = 2, p-value < 2.2e-16
> jarque.bera.test(lg.day.ret.vec)$p.value
X-squared
0
感谢帮助
最佳答案
有几种方法。这是一个可重现的示例:
library("car")
test <- with(Moore, leveneTest(conformity, fcategory))
首先,查看返回对象的结构,因为它通常会告诉您正在玩什么:
str(test)
这给出:
> str(test)
Classes ‘anova’ and 'data.frame': 2 obs. of 3 variables:
$ Df : int 2 42
$ F value: num 0.046 NA
$ Pr(>F) : num 0.955 NA
- attr(*, "heading")= chr "Levene's Test for Homogeneity of Variance (center = median)"
我们看到该对象是一个数据框,p 值位于第 3 列。因此,以下任何一项都将提取数据
test[,3] # pull out the entire 3rd column
test[1,3] # pull out only the none NA p-value
test$`Pr(>F)` # pull out the P-value column by name
test$`Pr(>F)`[1] # as above, but then take only the 1st element
对于上面的例子,这些给出了:
> test[,3]
[1] 0.9550975 NA
> test[1,3]
[1] 0.9550975
> test$`Pr(>F)`
[1] 0.9550975 NA
> test$`Pr(>F)`[1]
[1] 0.9550975
关于r - Levene 检验提取 p 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28597487/
我想在 R 中对 Levene 的测试进行成对比较事后测试。我知道如何使用 PROC GLM 在 SAS 中进行,但我似乎无法弄清楚如何在 R 中进行。有没有人有任何主意?在下面的示例中,我希望能够测
我已经在 R 上尝试了一段时间,但我似乎无法提取用于 levene 测试的 p 值(“Pr(>f) 的值)”。对 R 进行统计测试的常用方法是在测试命令末尾加上 $p.value。然而,这似乎不适用于
我正在尝试自动执行单向方差分析的预测试。我的数据会因治疗次数的不同而有所不同,因此我希望能够将它们动态地传递给 Levene 的测试。 这有效: from scipy.stats import lev
我一直在尝试使用 scipy.stats.levene没有成功。 我有一个形状为 (2128, 45100) 的 numpy 矩阵。每行都是一个样本,属于 3 个聚类之一。 我想测试集群之间是否存在同
长版本:我有一个用 C++ 编写的 python 包(称为 leven),要安装它,我需要通过用 C++ 编译它来构建 leven 包。为此,我尝试使用 Visual C++ 和 Mingw。 Vis
我正在尝试使用 python 2.7.10、windows 10 和 mingw 安装 leven 包 ( https://pypi.python.org/pypi/leven/ )。我收到以下错误:
将 Bootstrap 3 类赋予 span 等非 block 级元素是否可取?这方面的最佳实践是什么?我仍然会在任何地方看到这个问题的答案。 最佳答案 由于这些引导类只指定下面列出的 css 属性,
我一整天都在尝试安装这个 Python 库。它叫做 leven,您可以在这里找到它:https://pypi.python.org/pypi/leven/ . 它是用 C++ 编写的,我在尝试构建和安
我是一名优秀的程序员,十分优秀!