SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

MIEPDF

Name:
    MIEPDF (LET)
Type:
    Library Function
Purpose:
    Compute the Mielke's beta-kappa probability density function with shape parameters k and theta.
Description:
    The general form of Mielke's beta-kappa distribution has the following probability density function:

      f(x;k,theta,u,beta) = (k/beta)*((x-u)/beta)**(k-1)/
 [(1 + ((x-u)/beta)**theta)**(1 + k/theta)]
 x > u; k, theta, beta > 0

    with k and theta denoting shape parameters and u and beta denoting the location and scale parameters, respectively.

    The standard form of the distribution is

      f(x;k,theta) = k*(x**(k-1)/[(1 + x**theta)**(1 + k/theta)]
 x > 0; k, theta > 0

    Mielke's beta-kappa distribution is a special case of a reparameterized generalized F distribution of the form a*(F(v1,v2)b). The details of the reparameterization are given in Johnson, Kotz, and Balakrishnan. This reference also discusses several forms of generalized F distributions.

    This distribution is also closely related to the Kappa distribution (see Hosking and Wallis for details).

Syntax:
    LET <y> = MIEPDF(<x>,<k>,<theta>,<u>,<beta>)
                            <SUBSET/EXCEPT/FOR qualification>
    where <x> is a number, parameter, or variable;
                <k> is a number, parameter, or variable that specifies the first shape parameter;
                <theta> is a number, parameter, or variable that specifies the second shape parameter;
                <u> is a number, parameter, or variable that specifies the location parameter;
                <beta> is a number, parameter, or variable that specifies the scale parameter;
                <y> is a variable or a parameter (depending on what <x> is) where the computed Mielke's beta-kappa pdf value is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    The <u> and <beta> parameters are optional.

Examples:
    LET A = MIEPDF(3,0.5,2,0,1.5)
    LET X2 = MIEPDF(X1,K,THETA)
Note:
    Mielke's beta-kappa random numbers, probability plots, and goodness of fit tests can be generated with the commands:

      LET K = <value>
      LET THETA = <value>
      LET Y = MIELKE BETA KAPPA RANDOM NUMBERS FOR I = 1 1 N
      MIELKE BETA KAPPA PROBABILITY PLOT Y
      MIELKE BETA KAPPA PROBABILITY PLOT Y2 X2
      MIELKE BETA KAPPA PROBABILITY PLOT Y3 XLOW XHIGH
      MIELKE BETA KAPPA KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
      MIELKE BETA KAPPA CHI-SQUARE GOODNESS OF FIT Y2 X2
      MIELKE BETA KAPPA CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH

    The following commands can be used to estimate the k and theta shape parameter for the Mielke's beta-kappa distribution:

      LET K1 = <value>
      LET K2 = <value>
      LET THETA1 = <value>
      LET THETA2 = <value>
      MIELKE BETA KAPPA PPCC PLOT Y
      MIELKE BETA KAPPA PPCC PLOT Y2 X2
      MIELKE BETA KAPPA PPCC PLOT Y3 XLOW XHIGH
      MIELKE BETA KAPPA KS PLOT Y
      MIELKE BETA KAPPA KS PLOT Y2 X2
      MIELKE BETA KAPPA KS PLOT Y3 XLOW XHIGH

    The default values for K1 and K2 are 0.5 and 10, respectively. The default values for THETA1 and THETA2 are 0.5 and 10, respectively.

    The probability plot can then be used to estimate the location and scale (location = PPA0, scale = PPA1).

    The BOOTSTRAP DISTRIBUTION command can be used to find uncertainty intervals for the ppcc plot and the ks plot.

Default:
    None
Synonyms:
    None
Related Commands:
    MIECDF = Compute Miekle's beta-kappa cumulative distribution function.
    MIEPPF = Compute Miekle's beta-kappa percent point function.
    KAPPDF = Compute the Kappa probability density function.
    BETPDF = Compute the beta probability density function.
    FPDF = Compute the F probability density function.
    GAMPDF = Compute the gamma probability density function.
    NCBPDF = Compute the non-central beta probability density function.
    NORPDF = Compute the normal probability density function.
Reference:
    Hosking and Wallis (1997), "Regional Frequency Analysis", Cambridge University Press, Appendix A10.

    Johnson, Kotz, and Balakrishnan (1994), "Continuous Univariate Distributions: Volume 2", 2nd. Ed., John Wiley and Sons, p. 351.

Applications:
    Distributional Modeling
Implementation Date:
    1996/1: Original implementation as KAPPDF
    2008/5: Renamed as MIEPDF (KAPPDF now refers to regular Kappa distribution)
    2008/5: Beta parameter now properly treated as a scale parameter (was previously treated as a shape parameter)
Program 1:
     
    LET KP = DATA 0.5  1  1.5  2.0
    LET T1 = 0.5
    LET T2 = 1
    LET T3 = 1.5
    LET T4 = 2
    .
    MULTIPLOT 2 2
    MULTIPLOT CORNER COORDINATES 0 0 95 95
    MULTIPLOT SCALE FACTOR 2
    TITLE CASE ASIS
    TITLE OFFSET 2
    X3LABEL
    LINE COLOR BLACK BLUE RED GREEN
    .
    LOOP FOR LL = 1 1 4
       LET K = KP(LL)
       TITLE K = ^K, Theta = 0.5, 1, 1.5, 2
       PLOT MIEPDF(X,K,T1) FOR X = 0.01  0.01  5  AND
       PLOT MIEPDF(X,K,T2) FOR X = 0.01  0.01  5  AND
       PLOT MIEPDF(X,K,T3) FOR X = 0.01  0.01  5  AND
       PLOT MIEPDF(X,K,T4) FOR X = 0.01  0.01  5
    END OF LOOP
    END OF MULTIPLOT
    .
    JUSTIFICATION CENTER
    MOVE 50 97
    TEXT Mielke's Beta-Kappa PDF Functions
        
    plot generated by sample program

Program 2:
     
    let k = 1.8
    let theta = 1.2
    let ksav = k
    let thetasav = theta
    .
    let y = mielke beta-kappa rand numb for i = 1 1 200
    .
    let k1 = 0.5
    let k2 = 5
    let theta1 = 0.5
    let theta2 = 5
    .
    title automatic
    x3label
    mielke beta-kappa ppcc plot y
    just center
    move 50 6
    text K = ^shape1, Theta = ^shape2
    move 50 2
    text KSAV = ^ksav, THETASAV = ^thetasav
    .
    mielke beta-kappa ks plot y
    just center
    move 50 6
    text K = ^shape1, Theta = ^shape2
    move 50 2
    text KSAV = ^ksav, THETASAV = ^thetasav
    let k = shape1
    let theta = shape2
    .
    char x
    line blank
    mielke beta-kappa prob plot y
    just center
    move 50 6
    text PPA0 = ^ppa0, PPA1 = ^ppa1, PPCC = ^ppcc
    move 50 2
    text PPA0BW = ^ppa0bw, PPA1BW = ^ppa1bw
    line solid
    char blank
    .
    relative hist y
    let amin = minimum y
    let loc = max(ppa0bw,amin)
    let amax = maximum y
    title
    limits freeze
    pre-erase off
    plot miepdf(x,k,theta,loc,ppa1bw) for x = loc  0.01  amax
    limits
    pre-erase on
    .
    let ksloc = loc
    let ksscale = ppa1bw
    mielke beta kappa kolm smir goodness of fit y
        
    plot generated by sample program

    plot generated by sample program

    plot generated by sample program

    plot generated by sample program

                       KOLMOGOROV-SMIRNOV GOODNESS-OF-FIT TEST
      
     NULL HYPOTHESIS H0:      DISTRIBUTION FITS THE DATA
     ALTERNATE HYPOTHESIS HA: DISTRIBUTION DOES NOT FIT THE DATA
     DISTRIBUTION:            MEILKE BETA-KAPPA
        NUMBER OF OBSERVATIONS              =      200
      
     TEST:
     KOLMOGOROV-SMIRNOV TEST STATISTIC      =   0.6514558E-01
      
        ALPHA LEVEL         CUTOFF              CONCLUSION
                10%       0.086*              ACCEPT H0
                          0.085**
                 5%       0.096*              ACCEPT H0
                          0.095**
                 1%       0.115*              ACCEPT H0
                          0.114**
      
         *  - STANDARD LARGE SAMPLE APPROXIMATION  ( C/SQRT(N) )
        ** - MORE ACCURATE LARGE SAMPLE APPROXIMATION  ( C/SQRT(N + SQRT(N/10)) )
      
        

Date created: 1/26/2009
Last updated: 1/26/2009
Please email comments on this WWW page to alan.heckert@nist.gov.