R - F检验

F检验(方差齐性检验): 主要通过比较两组数据的方差,以确定他们的密度是否有显著性差异(判断两总体方差是否相等,就可以用F检验)。
F检验的前提: 数据满足正态分布,使用Shapiro-Will进行正态分布检验

# 正态分布检验
> shapiro.test(x)
> 
statistic	
the value of the Shapiro-Wilk statistic.
p.value	
an approximate p-value for the test. This is said in Royston (1995) to be adequate for p.value < 0.1.
method	
the character string "Shapiro-Wilk normality test".
data.name	
a character string giving the name(s) of the data.

### F检验的实现
var.test(x, ...)

## Default S3 method:
var.test(x, y, ratio = 1,
         alternative = c("two.sided", "less", "greater"),
         conf.level = 0.95, ...)

## S3 method for class 'formula'
var.test(formula, data, subset, na.action, ...)

重要:用F检验测试样本数据的偶然误差,对数据集进行方差齐性检验,从而判断数据是否有显著性差异,为方差分析提供了基本的判别方法。
检验数据方差齐性的方法:

  • Bartlett检验 - 数据服从正态分布bartlett.test()
  • Fligner-Killeen检验 - 非参数的检验方法fligner.test()
    当存在多个自变量时,检验前必须要使用interaction()函数将多个变量折叠为单一的变量:fligner.test(A ~interaction(B,C) )*
  • 3
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值