R 일원분산분석

(R 분산분석에서 넘어옴)

1 개요[ | ]

R one-way ANOVA
R 일원분산분석

2 예시 1[ | ]

# https://en.wikipedia.org/wiki/One-way_analysis_of_variance#Example
df = data.frame(
  group = c("A","A","A","A","A","A","B","B","B","B","B","B","C","C","C","C","C","C"),
  growth = c(6,8,4,5,3,4,8,12,9,11,6,8,13,9,11,8,7,12)
)
aov1 = aov(growth ~ group, data=df)
summary(aov1)

3 예시 2[ | ]

방법1 <- c(22, 20, 24, 22, 21, 19, 19, 21, 21, 18)
방법2 <- c(19, 17, 18, 16, 16, 17, 20, 20)
방법3 <- c(15, 16, 17, 17, 17, 14, 15)

par(family='NanumGothicCoding')
boxplot(방법1, 방법2, 방법3, main='방법별 소요시간', names=c('방법1', '방법2', '방법3'), ylab='소요시간')
points(c(mean(방법1), mean(방법2), mean(방법3)), pch=10 , cex=2)
소요시간 <- c(방법1, 방법2, 방법3)
집단 <- factor(rep(c('방법1', '방법2', '방법3'), c(10, 8, 7)))
일원분산분석 <- aov(소요시간 ~ 집단)
일원분산분석
summary(일원분산분석)

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}