방문자
Scientist. Husband. Daddy. --- TOLLE. LEGE
외부자료의 인용에 있어 대한민국 저작권법(28조)과 U.S. Copyright Act (17 USC. §107)에 정의된 "저작권물의 공정한 이용원칙 | the U.S. fair use doctrine" 을 따릅니다. 저작권(© 최광민)이 명시된 모든 글과 번역문들에 대해 (1) 복제-배포, (2) 임의수정 및 자의적 본문 발췌, (3) 무단배포를 위한 화면캡처를 금하며, (4) 인용 시 URL 주소 만을 사용할 수 있습니다. [후원 | 운영] [대문으로] [방명록] [(구)방명록]
법어
草人종/정 광미누/스님 가라사대: |
삶/은 계란이요 |
죽/은 대나무 |
난草/ 人가 ! |
블로그 내부검색
주제
연재
한 주 BEST
- [© 최광민] 타고르와 "동방의 등불"
- [© 최광민] 예수 vs. 예수 #07: 삼위일체 개념은 어디서 유래했을까?
- [© 최광민] 로마카톨릭 vs. 프로테스탄트 #03: 예정과 자유의지, 그리고 구원
- [© 최광민] 예수 vs. 예수 #02: 예수는 언제부터 신이었을까?
- [© 최광민] 예수 vs. 붓다 #5: 예수와 기독교 교부들은 윤회와 환생을 가르쳤을까?
- [© 최광민] 예수 vs. 예수 #11: 크리스마스의 기원과 동방박사의 별 (합본)
- [© 최광민] 바울 vs. 바울 #1: 여자의 씨, 아브라함의 씨, 다윗의 씨 - 히브리어 זֶרַע (제라)와 그리스어 σπέρμα (스페르마)의 용례
- [© 최광민] 전쟁에 관한 기독교 초기교부들의 견해
- [© 최광민] 예수 vs. 붓다 #1: 소위 "불교계통" 복음서들의 정체: {이사전}, {보병궁 복음서}, {유란시아書}, {임마누엘의 탈무드}
- [© 최광민] 예수 vs. 예수 #12: 과연 예수는 결혼, 재혼, 심지어 삼혼했을까? -- 막달라 마리아, 리디아, 마리온(?)
최신 포스팅
parametric anova for unequal variance + Bartlett Test of Homogeneity of Variances
Labels:
Informatics
이메일로 전송BlogThis!X에 공유Facebook에서 공유
Example
x <- c(10,11,15,8,16,12,20)
y <- c(10,14,18,25,28,30,35)
d <- c(x,y)
f <- as.factor(c(rep("a",7), rep("b",7)))
# Unequal variance:
t.test(x,y)$p.value
t.test(d~f)$p.value
# Equal variance:
t.test(x,y, var.equal=TRUE)$p.value
t.test(d~f, var.equal=TRUE)$p.value
anova(lm(d~f))[[5]]
summary(aov(lm(d~f)))[[1]][5]
summary(lm(d~f))[[4]][8]
## Not assuming equal variances
oneway.test(extra ~ group, data = sleep)
## Assuming equal variances
oneway.test(extra ~ group, data = sleep, var.equal = TRUE)
## which gives the same result as
anova(lm(extra ~ group, data = sleep)) # not for (smallest var)*4 < (largest var)
Details
If x is a list, its elements are taken as the samples or fitted linear models to be compared for homogeneity of variances. In this case, the elements must either all be numeric data vectors or fitted linear model objects, g is ignored, and one can simply use bartlett.test(x) to perform the test. If the samples are not yet contained in a list, use bartlett.test(list(x, ...)).
Otherwise, x must be a numeric data vector, and g must be a vector or factor object of the same length as x giving the group for the corresponding elements of x.
Value
A list of class "htest" containing the following components:
statistic
Bartlett's K-squared test statistic.
parameter
the degrees of freedom of the approximate chi-squared distribution of the test statistic.
p.value
the p-value of the test.
method
the character string "Bartlett test of homogeneity of variances".
data.name
a character string giving the names of the data.
References
Bartlett, M. S. (1937). Properties of sufficiency and statistical tests. Proceedings of the Royal Society of London Series A 160, 268–282.
See Also
var.test for the special case of comparing variances in two samples from normal distributions; fligner.test for a rank-based (nonparametric) k-sample test for homogeneity of variances; ansari.test and mood.test for two rank based two-sample tests for difference in scale.
Examples
require(graphics)
plot(count ~ spray, data = InsectSprays)
bartlett.test(InsectSprays$count, InsectSprays$spray)
bartlett.test(count ~ spray, data = InsectSprays)
이메일로 전송BlogThis!X에 공유Facebook에서 공유
Labels:
Informatics
Scientist. Husband. Daddy. --- TOLLE. LEGE
외부자료의 인용에 있어 대한민국 저작권법(28조)과 U.S. Copyright Act (17 USC. §107)에 정의된 "저작권물의 공정한 이용원칙 | the U.S. fair use doctrine" 을 따릅니다. 저작권(© 최광민)이 명시된 모든 글과 번역문들에 대해 (1) 복제-배포, (2) 임의수정 및 자의적 본문 발췌, (3) 무단배포를 위한 화면캡처를 금하며, (4) 인용 시 URL 주소 만을 사용할 수 있습니다. [후원 | 운영] [대문으로] [방명록] [ (구)방명록]

