R 맥니머의 검정

1 개요[ | ]

R McNemar's test
R 맥니머의 검정

2 corrected[ | ]

2.1 예시 1: 대통령 지지 조사[ | ]

## Agresti (1990), p. 350.
## 대통령 지지 조사
## 투표연령인 미국인 1600명을 대상으로, 한 달 간격으로 대통령 지지 조사
Performance <-
  matrix(c(794, 86, 150, 570),
         nrow = 2,
         dimnames = list("1st Survey" = c("Approve", "Disapprove"),
                         "2nd Survey" = c("Approve", "Disapprove")))
Performance
mcnemar.test(Performance)

2.2 예시 2[ | ]

t <- as.table(rbind(c(20, 40), c(10, 30)))
dimnames(t) <- list(Before = c("Agree","Disagree"), After = c("Agree","Disagree"))
t
mcnemar.test(t) # χ²=16.82, p=.0000411

3 not corrected[ | ]

3.1 예시 1[ | ]

# https://en.wikipedia.org/wiki/McNemar%27s_test#Examples
t <- as.table(rbind(c(101, 121), c(59, 33)))
dimnames(t) <- list(Before = c("present", "absent"), After = c("present", "absent"))
t
mcnemar.test(t, correct=F) # χ²=21.356, p=.000003815

3.2 예시 2[ | ]

# https://en.wikipedia.org/wiki/McNemar%27s_test#Examples
t <- as.table(rbind(c(59, 6), c(16, 80)))
dimnames(t) <- list(Before = c("present", "absent"), After = c("present", "absent"))
t
mcnemar.test(t, correct=F) # χ²=4.5455, p=.03301

4 같이 보기[ | ]

5 참고[ | ]

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