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

STACK

Name:
    STACK (LET)
Type:
    LET Subcommand
Purpose:
    Convert a set of response variables to a single response variable and a group-id variable.
Description:
    Many commands in Dataplot expect the data to be in the form of a single response variable and a group-id variable (e.g., BOX PLOT, MEAN PLOT, SD PLOT, TABULATE). However, many data files will contain grouped data in a form where each group is stored as a separate response variable.

    The STACK command provides a convenient method for converting from the multi-column form to the single response variable with group-id variable form.

Syntax:
    LET <y2> <x2> = STACK <x1> ... <xk>
                            <SUBSET/EXPCEPT/FOR qualification>
    where <x1> ... <xk> is a set of one or more response variables;
                <y2> is the variable to contain <x1> ... <xk> in a single response variable;
                <x2> is the variable to contain the group-id variable;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    Note that the response variables do not have to be the same size.

Examples:
    LET Y2 X2 = STACK Z1 Z2 Z3 Z4 Z5
Default:
    None.
Synonyms:
    None
Related Commands:
    EXTEND = Extends a variable by another variable.
    LET = Creates, transforms, etc. a variable.
    MEAN PLOT = Generate a mean plot.
    BOX PLOT = Generate a box plot.
    TABULATE = Peform a tabulation.
Applications:
    Data Management
Implementation Date:
    2003/5
Program:
    SKIP 25
    READ MONTGOME.DAT Y1 Y2 Y3
    .
    LET Z2 X2 = STACK Y1 Y2 Y3
    .
    XTIC OFFSET 0.5 0.5
    LET NVAR = 3
    XLIMITS 1 NVAR
    MAJOR XTIC MARK NUMBER NVAR
    MINOR XTIC MARK NUMBER 0
    MAJOR XTIC MARK NUMBER NVAR
    X1TIC MARK LABEL FORMAT ALPHA
    X1TIC MARK LABEL CONTENT LARGE MEDIUM SMALL
    .
    MULTIPLOT SCALE FACTOR 1.5
    MULTIPLOT CORNER COORDINATES 0 0 100 100
    MULTIPLOT 2 2
    CHARACTER X BLANK
    LINE BLANK SOLID
    Y1LABEL MEAN (PERCENTAGE CLASSIFICATION)
    MEAN PLOT Z2 X2
    Y1LABEL SD (PERCENTAGE CLASSIFICATION)
    SD PLOT Z2 X2
    LINES BOX PLOT
    CHARACTER BOX PLOT
    FENCES ON
    Y1LABEL (PERCENTAGE CLASSIFICATION)
    BOX PLOT Z2 X2
    END OF MULTIPLOT 
        

    plot generated by sample program

Date created: 5/15/2003
Last updated: 4/19/2005
Please email comments on this WWW page to alan.heckert@nist.gov.