McNemar test

버전 2.0.0.0 (13.7 KB) 작성자: Giuseppe Cardillo
Perform the McNemar test on a 2x2 matrix
다운로드 수: 3.7K
업데이트 날짜: 2018/3/14

Permorm McNemar's chi square on a 2x2 matrix
In statistics, McNemar's test is a non-parametric method used on nominal
data to determine whether the row and column marginal frequencies are
equal. It is named after Q. McNemar, who introduced it in 1947. It is
applied to 2x2 contingency tables with a dichotomous trait with matched
pairs of subjects.
Syntax: mcnemar(x,alpha)

Inputs:
X - 2x2 data matrix
ALPHA (default 0.05)
Outputs:
- Chi Square critical value
- Chi square value
- p-value
- Power
Example:
In the following example, a researcher attempts to determine if a drug
has an effect on a particular disease.

Drug
+ -
--------------------
+ | 101 | 59 |
|------------------- Placebo
- | 121 | 33 |
--------------------

x=[101 59; 121 33];

Calling on Matlab the function:
mcnemar(x)

Answer is:

Critical value at 95% fiducial level = 3.8415<br/>
McNemar chi-square (with Yates'es correction) = 20.672222 p = 0.000005<br/>
alpha = 0.0500 Zb = 2.7566 Power (2-tails) = 0.0058<br/>

Created by Giuseppe Cardillo
giuseppe.cardillo-edta@poste.it

To cite this file, this would be an appropriate format:
Cardillo G. (2007) McNemar test: perform the McNemar test on a 2x2
matrix.
http://www.mathworks.com/matlabcentral/fileexchange/15472

인용 양식

Giuseppe Cardillo (2024). McNemar test (https://github.com/dnafinder/mcnemar), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
2.0.0.0

inputparser and github link

1.2.0.0

Changes in description

1.1.0.0

Changes in help section

1.0.0.0

mistake correction

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.