Dataplot Vol 2 Vol 1

TOPPDF

Name:
TOPPDF (LET)
Type:
Library Function
Purpose:
Compute the Topp and Leone probability density function with shape parameter .
Description:
The standard Topp and Leone distribution has the following probability density function:

with denoting the shape parameter.

This distribution can be extended with lower and upper bound parameters. If a and b denote the lower and upper bounds, respectively, then the location and scale parameters are:

location = a
scale = b - a

The general form of the distribution can then be found by using the relation

Kotz and van Dorp have developed the Topp and Leone distribution as an extension to the triangular distribution. They suggest it as an alternative for cases where a bounded distribution is appropriate (other alternatives include the uniform, triangular, trapezoid, beta, Johnson SB, and two-sided power distributions).

The generalized Topp and Leone and reflected generalized Topp and Leone distributions are generalizations of the Topp and Leone distribution.

Syntax:
LET <y> = TOPPDF(<x>,<beta>,<a>,<b>)
<SUBSET/EXCEPT/FOR qualification>
where <x> is a number, parameter, or variable containing values in the interval (a,b);
<y> is a variable or a parameter (depending on what <x> is) where the computed Topp and Leone pdf value is stored;
<beta> is a positive number, parameter, or variable that specifies the shape parameter;
<a> is a number, parameter, or variable that specifies the lower limit;
<b> is a number, parameter, or variable that specifies the upper limit;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

If a and b are omitted, they default to 0 and 1, respectively.

Examples:
LET A = TOPPDF(0.3,0.2)
LET Y = TOPPDF(X,0.5,0,5)
PLOT TOPPDF(X,2,0,3) FOR X = 0 0.01 3
Note:
Topp and Leone random numbers, probability plots, and goodness of fit tests can be generated with the commands:

LET BETA = <value>
LET A = <value>
LET B = <value>
LET Y = TOPP AND LEONE RANDOM NUMBERS FOR I = 1 1 N
TOPP AND LEONE PROBABILITY PLOT Y
TOPP AND LEONE PROBABILITY PLOT Y2 X2
TOPP AND LEONE PROBABILITY PLOT Y3 XLOW XHIGH
TOPP LEONE KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
TOPP LEONE CHI-SQUARE GOODNESS OF FIT Y2 X2
TOPP LEONE CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH

The following commands can be used to estimate the beta shape parameter for the Topp and Leone distribution:

LET BETA1 = <value>
LET BETA2 = <value>
TOPP AND LEONE PPCC PLOT Y
TOPP AND LEONE PPCC PLOT Y2 X2
TOPP AND LEONE PPCC PLOT Y3 XLOW XHIGH
TOPP AND LEONE KS PLOT Y
TOPP AND LEONE KS PLOT Y2 X2
TOPP AND LEONE KS PLOT Y3 XLOW XHIGH

The default values for BETA1 and BETA2 are 0.1 and 10, respectively.

The probability plot can then be used to estimate the lower and upper limits (lower limit = PPA0, upper limit = PPA0 + PPA1).

The following options may be useful for these commands.

1. Instead of generating the ppcc plot or ks plot on the original data, we can generate them on selected percentiles of the data. For example, if we have 1,000 points, we can choose to generate the plots on 100 evenly spaced percentiles with the command

SET PPCC PLOT DATA POINTS 100

This can be used to speed up the generation of the plot for larger data sets.

The percent point function for the Topp and Leone distribution is available in closed form, so this option is typically not needed.

2. For the ks plot, we can fix the location and scale. This is equivalent to assuming that the lower and upper limits are known (e.g., we could use the data minimum and maximum as the lower and upper limit values). Given that the lower and upper limits are LOWLIM and UPPLIM, enter the commands

LET KSLOC = LOWLIM
LET KSSCALE = UPPLIM

The ppcc plot is invariant to location and scale, so we cannot fix the lower and upper limits.

The maximum likelihood estimate of beta can be computed with the command

TOPP AND LEONE MAXIMUM LIKELIHOOD Y

The maximum likelihood estimate of beta is;

For the standard Topp and Leone distribution, the maximum likelihood estimate of is the solution of the following equation:

If the data lie outside the (0,1) interval, then we first apply the transformation

with XMIN and XMAX denoting the minimum and maximum of the data, respectively. We then estimate using the X' values.

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

Default:
None
Synonyms:
None
Related Commands:
 TOPCDF = Compute the Topp and Leone cumulative distribution function. TOPPPF = Compute the Topp and Leone percent point function. RGTPDF = Compute the generalized reflected Topp and Leone probability density function. GTLPDF = Compute the generalized Topp and Leone probability density function. TSPPDF = Compute the two-sided power probability density function. BETPDF = Compute the beta probability density function. TRIPDF = Compute the triangular probability density function. TRAPDF = Compute the trapezoid probability density function. UNIPDF = Compute the uniform probability density function. POWPDF = Compute the power probability density function. JSBPDF = Compute the Johnson SB probability density function.
Reference:
Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta: Other Continuous Families of Distributions with Bounded Support and Applications", World Scientific, chapter 2.
Applications:
Distributional Modeling
Implementation Date:
2007/2
Program 1:

LABEL CASE ASIS
TITLE CASE ASIS
TITLE OFFSET 2
.
MULTIPLOT 2 2
MULTIPLOT CORNER COORDINATES 0 0 100 95
MULTIPLOT SCALE FACTOR
.
LET BETA  = 0.5
TITLE Beta = ^beta
PLOT TOPPDF(X,BETA) FOR X = 0  0.01  1
.
LET BETA  = 1
TITLE Beta = ^beta
PLOT TOPPDF(X,BETA) FOR X = 0  0.01  1
.
LET BETA  = 1.5
TITLE Beta = ^beta
PLOT TOPPDF(X,BETA) FOR X = 0  0.01  1
.
LET BETA  = 2
TITLE Beta = ^beta
PLOT TOPPDF(X,BETA) FOR X = 0  0.01  1
.
END OF MULTIPLOT
.
JUSTIFICATION CENTER
MOVE 50 97
TEXT Topp and Leone Probability Density Functions

Program 2:

let beta = 2.2
let y = topp and leone rand numb for i = 1 1 200
.
let betasav = beta
topp and leone ppcc plot y
just center
move 50 5
let beta = shape
text maxppcc = ^maxppcc, Beta = ^beta
move 50 2
text Betasav = ^betasav
.
char x
line blank
topp and leone prob plot y
move 50 5
text PPA0 = ^ppa0, PPA1 = ^ppa1
move 50 2
let upplim = ppa0 + ppa1
text Lower Limit = ^ppa0, Upper Limit = ^upplim
char blank
line solid
.
let ksloc = ppa0
let ksscale = upplim
topp and leone kolm smir goodness of fit y
.
topp and leone mle y

KOLMOGOROV-SMIRNOV GOODNESS-OF-FIT TEST

NULL HYPOTHESIS H0:      DISTRIBUTION FITS THE DATA
ALTERNATE HYPOTHESIS HA: DISTRIBUTION DOES NOT FIT THE DATA
DISTRIBUTION:            TOPP AND LEONE
NUMBER OF OBSERVATIONS              =      200

TEST:
KOLMOGOROV-SMIRNOV TEST STATISTIC      =   0.4618490E-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)) )

TOPP AND LEONE PARAMETER ESTIMATION

SUMMARY STATISTICS:
THE NUMBER OF OBSERVATIONS               =      200
SAMPLE MEAN                              =   0.5055376
SAMPLE STANDARD DEVIATION                =   0.2192913
SAMPLE MINIMUM                           =   0.2630787E-01
SAMPLE MAXIMUM                           =   0.9543530

MAXIMUM LIKELIHOOD ESTIMATES:
ESTIMATE OF THE SHAPE PARAMETER BETA    =    2.373120

Date created: 9/10/2007
Last updated: 9/10/2007