Code covered by the BSD License  

Highlights from
Barnardextest

4.0

4.0 | 4 ratings Rate this file 10 Downloads (last 30 days) File Size: 3.95 KB File ID: #6198
image thumbnail

Barnardextest

by Antonio Trujillo-Ortiz

 

05 Nov 2004 (Updated 22 Nov 2004)

Barnard's Exact Probability Test.

| Watch this File

File Information
Description

This file, as the Fisher's exact test, performs the exact probability test for a table of frequency data cross-classified according to two categorical variables, each of which has two levels or subcategories (2x2). It is a non-parametric statistical test used to determine if there are nonrandom associations between the two categorical variables. Barnard's exact test is used to calculate an exact P-value with small number of expected frequencies, for which the Chi-square test is not appropriate (in case the total number of observations is less than 20 or the number of frequency cells are less than 5). The test was proposed by G. A. Barnard in two papers (1945 and 1947). While Barnard's test seems like a natural test to consider, it's not at all commonly used. This probably due that it is a little unknown.

Perhaps due to its computational difficulty it is not widely used until recently, where the computers make it feasible. It is considering that the Barnard's exact test is more powerful than the Fisher's one.

It needs to inputs the a,b,c,d -observed frequency cells.

The output is a table with the Wald statistic, nuisance parameter and P-value. Also a plot of the nuisance parameter PI against the corresponding P-value for all the PI in (0, 1). It shows the maximized PI where it attains the P-value.For a least conflict with figure, press the left mouse button on the legend and drag to the desired location.

Acknowledgements
This submission has inspired the following:
MyBarnard
MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
23 Aug 2005 Claudia Lerma  
19 Jan 2006 Joachim Roehmel

This is not Barnard's original (1945, 1947)proposal.

21 Mar 2006 Henri Bureau  
22 May 2007 sandro malacrida  
Please login to add a comment or rating.
Updates
10 Nov 2004

It was added an appropriate format to cite this file.

10 Nov 2004

Description was improved.

15 Nov 2004

Help was improved.

22 Nov 2004

Text was improved.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 07:34:52
probability Antonio Trujillo-Ortiz 22 Oct 2008 07:34:52
barnard Antonio Trujillo-Ortiz 22 Oct 2008 07:34:52
crosstabulation Antonio Trujillo-Ortiz 22 Oct 2008 07:34:52
contingency tables Antonio Trujillo-Ortiz 22 Oct 2008 07:34:52
two categorical Antonio Trujillo-Ortiz 22 Oct 2008 07:34:52

Contact us at files@mathworks.com