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

CUMULATIVE STATISTIC PLOT

Name:
    ... CUMULATIVE STATISTIC PLOT
Type:
    Graphics Command
Purpose:
    Plots the cumulative value of a statistic for a response variable. Optionally, the cumulative statistic can be plotted against a group-id variable.
Description:
    The <stat> STATISTIC PLOT can be used to plot the value of a statistic versus the index of a group-id variable. So if you have 10 groups in your data, there will be 10 values of the statistic computed.

    The <stat> CUMULATIVE STATISTIC PLOT is a variant of the <stat> STATISTIC PLOT. There are two cases.

    1. If there is a single group in the data, then the cumulative value of the statistic will be plotted versus the sequence number. That is, plot

        \( S_{Y_i} \) verus i

      where

        \( S_{Y_i} \) versus i = the value of the statistic for observations 1 to i.

      A reference line will be drawn at the mean value of the computed statistics.

      The appearance of these two traces is controlled by the first two settings of the LINES, CHARACTERS, SPIKES, BARS, and and associated attribute setting commands.

    2. If there are multiple groups in the data, then the process above is repeated for each group. In this case, the x-coordinates is the index of the full data set, not just the current group. However, the cumulative statistic is only computed for points in the current group. The group sizes do not need to be equal.

      The distinction between this command and the STATISTIC PLOT is that the STATISTIC PLOT only plots the value of the statistic for all points in the group while this command plots the cumulative value of the statistic for all points in the group. For example, if there are ten groups with ten points each, the STATISTIC PLOT will plot ten points while the CUMULATIVE STATISTIC PLOT will plot 100 points.

      A reference line will be drawn for each group (the reference value is the mean value of the statistic for the specific group).

      The traces for the plot are defined in pairs. That is, trace one is the cumulative statistics for group one, trace two is the reference line for group one, trace three is the cumulative statistics for group two, trace four is the reference line for group two, and so on.

      If you enter the command

        SET CUMULATIVE STATISTIC PLOT GROUPS STACKED

      then the x coordinate will start at one for each group. In this case, no reference line is drawn.

      To turn off the stacking option, enter

        SET CUMULATIVE STATISTIC PLOT GROUPS DEFAULT

Syntax 1:
    <stat> CUMULATIVE STATISTIC PLOT <y1> ... <yk>
                            <SUBSET/EXCEPT/FOR qualification>
    where <stat> is one of Dataplot's supported statistics;
                <y1> ... <yk> is a list of 1 to 3 response variables (<stat> determines how many response variables);
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    For a list of supported statistics, enter

    This syntax is for the case without groups in the data.

Syntax 2:
    <stat> CUMULATIVE STATISTIC PLOT <y1> ... <yk> <x>
                            <SUBSET/EXCEPT/FOR qualification>
    where <stat> is one of Dataplot's supported statistics;
                <y1> ... <yk> is a list of 1 to 3 response variables (<stat> determines how many response variables);
                <x> is a group-id variable;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    For a list of supported statistics, enter

    This syntax is used for the case where there is a group-id variable.

Examples:
    MEAN CUMULATIVE STATISTIC PLOT Y
    MEAN CUMULATIVE STATISTIC PLOT Y X
    MEAN CUMULATIVE STATISTIC PLOT Y X SUBSET X > 2
    SD CUMULATIVE STATISTIC PLOT Y
    CORRELATION CUMULATIVE STATISTIC PLOT Y1 Y2
Note:
    In some cases, you many want to have some minimum number of points before computing the statistic. You can enter the command

      SET CUMULATIVE STATISTIC START <value>

    where <value> indicates the minimum number of points before the statistic is computed. Note that if this value is greater than one, then the x-coordinate of the first point will be <value> (rounded to the nearest integer), not one.

Note:
    The word STATISTIC is required in this command (i.e., CUMULATIVE PLOT is not a synonym for CUMULATIVE STATISTIC PLOT). This is to avoid conflicts with other commands.
Default:
    None
Synonyms:
    None
Related Commands: Applications:
    Exploratory Data Analysis
Implementation Date:
    2015/5

    The list of supported statistics is frequently updated. Enter HELP STATISTICS for a current list of supported statistics.

Program:
     
    . Step 1:   Read the data
    .
    dimension 40 columns
    skip 25
    read zarr13.dat y1
    read berger1.dat y2 x2
    read gear.dat y4 x4
    skip 0
    .
    . Step 2:   Set some default plot control options
    .
    case asis
    label case asis
    tic mark label case asis
    title case asis
    title offset 2
    y1label displacement 15
    x1label displacement 12
    multiplot scale factor 2
    multiplot corner coordinates 5 5 95 95
    .
    . Step 3:   Cumulative plots, no groups, single response variable
    .
    multiplot 2 2
    x1label Sequence
    .
    title Mean Cumulative Statistic Plot
    y1label Cumulative Mean
    mean cumulative statistic plot y1
    .
    title Median Cumulative Statistic Plot
    y1label Cumulative Median
    median cumulative statistic plot y1
    .
    multiplot 2 2 3
    title SD Cumulative Statistic Plot
    y1label Cumulative SD
    standard deviation cumulative statistic plot y1
    .
    title Skewness Cumulative Statistic Plot
    y1label Cumulative Skewness
    skewness cumulative statistic plot y1
    .
    end of multiplot
    .
    just center
    move 50 97
    text Cumulative Statistic Plots for ZARR13.DAT
    .
    y1label displacement
    x1label displacement
    .
    . Step 4:   Cumulative/moving plots, no groups, two response variable
    .
    xlimits 0 120
    .
    title Correlation Cumulative Statistic Plot for BERGER1.DAT
    y1label Cumulative Correlation
    correlation cumulative statistic plot y2 x2
    .
    xlimits
    .
    . Step 5:   Cumulative plots, groups, one response variable
    .
    title Mean Cumulative Statistic Plot for GEAR.DAT
    y1label Cumulative Mean
    mean cumulative statistic plot y4 x4
        

    plot generated by sample program

    plot generated by sample program

    plot generated by sample program

Date created: 05/29/2015
Last updated: 12/04/2023

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