|
|
| File Information |
| Description |
This m-file performs the conditional as well as the Chi-squared corrected for discontinuity McNemar's exact test for two dependent (correlated) samples that can occur in matched-pair studies with a dichotomous (yes-no) response. Dependent samples can also occur when the same subject is measured at two different times. It tests the null hypothesis of marginal homogeneity. This implies that rows totals are equal to the corresponding column totals. So, since the a- and the d-value on both sides of the equations cancel, then b = c. This is the basis of the proposed test by McNemar (1947). The McNemar test tests the null hypothesis that conditional on b + c, b has a binomial (b + c, 1/2) distribution.
The proper way to test the null hypothesis is to apply the one-sample binomial test. If there is no association between b and c values, then the probability is 0.5 that the sample 1 and sample 2 pair falls in the
upper-right cell and 0.5 that it falls in the lower-left cell, given that the pair falls off the main diagonal.
File needs to input data vector defined by the observed frequency cells [a,b,c,d], desired test [t = 1, one-tail; t = 2, two-tail (default)], and significance level (default = 0.05).
It outputs a table with the proportion of success for the dependent samples and the P-value. |
| MATLAB release |
MATLAB 7 (R14)
|
| Zip File Content |
|
| Other Files |
license.txt, McNemarextest.m
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (8) |
| 18 May 2006 |
david vexler
|
|
|
| 20 May 2006 |
J. Z.
|
|
|
| 23 May 2006 |
I Y
|
|
|
| 23 May 2006 |
albert Miller
|
|
|
| 06 Apr 2009 |
HR Kang
|
|
|
| 06 Apr 2009 |
HR Kang
|
|
|
| 06 Apr 2009 |
HR Kang
|
|
|
| 20 Oct 2009 |
Skynet
|
|
|
| Updates |
| 22 Nov 2004 |
It was added an appropriate format to cite this file. |
| 24 May 2006 |
Valuable suggestions given by I.Y. were taken into account in order to improve this m-file. Review dated 2006-05-23. |
| 25 May 2006 |
Text was improved. |
| 22 Oct 2009 |
The file was modified to perform also a Chi-squared test corrected by discontinuity, besides the original conditioned one. |
| 23 Oct 2009 |
Text was improved. |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com