Home > brede > brede_cdf_rank.m

brede_cdf_rank

PURPOSE ^

brede_cdf_rank - Compute lower tail area for rank

SYNOPSIS ^

function lta = brede_cdf_rank(x, y, varargin)

DESCRIPTION ^

 brede_cdf_rank       - Compute lower tail area for rank

       function lta = brede_cdf_rank(x, y)

       Input:  x   A scalar
               y   A vector of values

       Property:   Tolerance  [ {none} | some ]

       Output: lta Lower tail area

       (One-side) lower-tail area of rank.

       This function can be used, e.g., in connection with
       permutation testing where the 'x' is the true statistics and
       'y' is a vector containing the randomized statistics. A
       P-value can be calculated as 1-brede_cdf_rank(x,y), and this is
       conservative meaning that the P-value will be rounded towards
       1. 

       Numerical errors are corrected with 100*eps if the 'tolerance'
       is set to 'some'. This is appropriate if the computation of
       the statistics (both the true and the randomized) result in
       numerical errors.

       Example: 
         brede_cdf_rank(8, 1:7)
         % = 7/8

         brede_cdf_rank(7, 1:7) 
         % = 6/8

         brede_cdf_rank(7+10*eps, 1:7, 'tolerance', 'some')
         % = 6/8       

         brede_cdf_rank(0, 1:7)
         % = 0

         1 - brede_cdf_rank(20, 1:19)
         % = 0.05

       See also BREDE, BREDE_CDF_BIN, BREDE_CDF_GAUSS,
                BREDE_LOC_TEST_EQUAL.

 $Id: brede_cdf_rank.m,v 1.2 2005/08/16 18:53:40 fnielsen Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005