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 1 Vol 2

ORD PLOT

Name:
    ORD PLOT
Type:
    Graphics Command
Purpose:
    Generates an Ord plot.
Description:
    An Ord plot can be used to distinguish whether a data set follows a Poisson, binomial, negative binomial, or logarithmic series distribution.

    If x and nx denote the class value and the corresponding class frequency, then the Ord plot is a plot of

      \( \frac{x n_{x}} {n_{x-1}} \)   versus x

    If this plot is approximately linear, then it can help distinguish between these four distributions based on the following table:

      Distribution Slope
      b
      Intercept
      a
      Parameter Estimate

      Poisson 0 + \( \lambda \) = a
      Binomial - + p = b/(b-1)
      Negative Binomial + + p = 1 - b
      Logarithmic Series + - \( \theta \) = -a

    The slope and intercept can be determined by fitting a line to the plotted points. We follow the suggestion of Friendly of using the weights

      \( w_{x} = \sqrt{n_{x} - 1} \)

    This compensates for the fact that classes with small frequency have large variance.

    The primary disadvantage of this plot is that a discrepant frequency affects the points for both x and x+1. For this reason, the Ord plot does not have good resistance properties.

Syntax 1:
    ORD PLOT <y>             <SUBSET/EXCEPT/FOR qualification>
    where <y> is a response variable;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax is used for the case where you have raw data. Dataplot will automatically create the frequency table.

Syntax 2:
    ORD PLOT <y> <x>             <SUBSET/EXCEPT/FOR qualification>
    where <y> is a variable containing frequencies;
                <x> is a variable containing the class value;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax is used for the case where your data is already in the form of a frequency table.

Examples:
    ORD PLOT Y
    ORD PLOT Y X
Note:
    The appearance of the plot can be controlled with the LINE and CHARACTER commands. The first setting is for the plot points and the second setting is for the fitted line. This is demonstrated with the sample plot below.
Note:
    The following internal parameters are saved by this plot:

      PPA0 - the intercept of the fitted line
      PPA1 - the slope of the fitted line
Default:
    None
Synonyms:
    None
Related Commands: References:
    Friendly (2000), "Visualizing Categorical Data", SAS Publishing Inc., Cary, NC, pp. 49-56.
Applications:
    Distributional Modeling
Implementation Date:
    2007/5
Program:
     
    . Data from p. 47 of Friendly
    read x y
    0  109
    1   65
    2   22
    3    3
    4    1
    end of data
    .
    title case asis
    title offset 2
    label case asis
    title Ord Plot
    y1label Frequency Ratio
    x1label x
    .
    tic offset units screen
    tic offset 3 3
    xlimits 1 4
    major xtic mark number 4
    minor xtic mark number 0
    .
    character x blank
    line blank dotted
    .
    ord plot y x
        
    plot generated by sample program

Date created: 07/25/2007
Last updated: 12/04/2023

Please email comments on this WWW page to alan.heckert@nist.gov.