Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

cdf_25.c

Go to the documentation of this file.
00001 #include "cdflib.h"
00002 void cumbet(double *x,double *y,double *a,double *b,double *cum,
00003             double *ccum)
00004 /*
00005 **********************************************************************
00006  
00007      void cumbet(double *x,double *y,double *a,double *b,double *cum,
00008             double *ccum)
00009 
00010           Double precision cUMulative incomplete BETa distribution
00011  
00012  
00013                               Function
00014  
00015  
00016      Calculates the cdf to X of the incomplete beta distribution
00017      with parameters a and b.  This is the integral from 0 to x
00018      of (1/B(a,b))*f(t)) where f(t) = t**(a-1) * (1-t)**(b-1)
00019  
00020  
00021                               Arguments
00022  
00023  
00024      X --> Upper limit of integration.
00025                                         X is DOUBLE PRECISION
00026  
00027      Y --> 1 - X.
00028                                         Y is DOUBLE PRECISION
00029  
00030      A --> First parameter of the beta distribution.
00031                                         A is DOUBLE PRECISION
00032  
00033      B --> Second parameter of the beta distribution.
00034                                         B is DOUBLE PRECISION
00035  
00036      CUM <-- Cumulative incomplete beta distribution.
00037                                         CUM is DOUBLE PRECISION
00038  
00039      CCUM <-- Compliment of Cumulative incomplete beta distribution.
00040                                         CCUM is DOUBLE PRECISION
00041  
00042  
00043                               Method
00044  
00045  
00046      Calls the routine BRATIO.
00047  
00048                                    References
00049  
00050      Didonato, Armido R. and Morris, Alfred H. Jr. (1992) Algorithim
00051      708 Significant Digit Computation of the Incomplete Beta Function
00052      Ratios. ACM ToMS, Vol.18, No. 3, Sept. 1992, 360-373.
00053  
00054 **********************************************************************
00055 */
00056 {
00057 static int ierr;
00058 /*
00059      ..
00060      .. Executable Statements ..
00061 */
00062     if(!(*x <= 0.0e0)) goto S10;
00063     *cum = 0.0e0;
00064     *ccum = 1.0e0;
00065     return;
00066 S10:
00067     if(!(*y <= 0.0e0)) goto S20;
00068     *cum = 1.0e0;
00069     *ccum = 0.0e0;
00070     return;
00071 S20:
00072     bratio(a,b,x,y,cum,ccum,&ierr);
00073 /*
00074      Call bratio routine
00075 */
00076     return;
00077 } /* END */
 

Powered by Plone

This site conforms to the following standards: