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

SUM OF SQUARES

Name:
    SUM OF SQUARES (LET)
Type:
    Let Subcommand
Purpose:
    Compute the sum of squares of a variable.
Description:
    The sum of squares has the formula:

      \( \mbox{SSQ} = \sum_{i=1}^{N}{X_{i}^2} \)

    You can also compute the difference of the sum of squares between two response variables. That is, compute the sum of squares for each variable and then compute the difference between these two values.

Syntax 1:
    LET <par> = SUM OF SQUARES <y>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the computed sum of squares is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Syntax 2:
    LET <par> = DIFFERENCE OF SUM OF SQUARES <y1> <y2>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable;
                <y2> is the second response variable;
                <par> is a parameter where the computed difference of the sum of squares is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the sum of squares of <y1> and <y2> and then computes the difference of the two sum of squares values.

Examples:
    LET A = SUM OF SQUARES Y1
    LET A = SUM OF SQUARES Y1 SUBSET TAG > 2
    LET A = DIFFERENCE OF SUM OF SQUARES Y1 Y2
Note:
    In some applications it may be desired to cap the value of outliers. This is most common when the response variable is a z-score or some other standardized score. To specify this value, enter the command

      LET CAPVALUE = <value>

    where <value> is typically 3 or 4 (if the reponse data are z-scores or z-score type data). Note that the value represents an absolute value. For example, if CAPVALUE is 4, values greater than 4 will be set to 4 and values less than -4 will be set to -4.

Note:
    Dataplot statistics can be used in a number of commands. For details, enter

Default:
    None
Synonyms:
    SSQ is a synonym for SUM OF SQUARES
Related Commands: Applications:
    Statistics
Implementation Date:
    2012/2
    2012/6: Added DIFFERENCE OF SUM OF SQUARES
Program:
     
    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
    LET SSQ = SUM OF SQUARES Y1
        
    The resulting value is 85.67012.

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 06/29/2012
Last updated: 11/12/2015

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