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

PARTIAL CORRELATION

Name:
    PARTIAL CORRELATION (LET)
Type:
    Let Subcommand
Purpose:
    Compute the partial correlation coefficient between two variables given the effect of a third variable.
Description:
    The standard correlation coefficient is a measure of the linear relationship between two variables. It is computed as:

      \( r = \frac{S_{xy}}{\sqrt{S_{xx}} \sqrt{S_{yy}}} \)

    where

      \( S_{xx} = \sum_{i=1}^{N}{(X_{i}-\bar{X})^2} \)
      \( S_{yy} = \sum_{i=1}^{N}{(Y_{i}-\bar{Y})^2} \)
      \( S_{xy} = \sum_{i=1}^{N}{(X_{i}-\bar{X}) (Y_{i} - \bar{Y})} \)

    A perfect linear relationship yields a correlation coefficient of +1 (or -1 for a negative relationship) and no linear relationship yields a correlation coefficient of 0.

    Partial correlation is the correlation between two variables after removing the effect of one or more additional variables. This command is specifcally for the the case of one additional variable. In this case, the partial correlation can be computed based on standard correlations between the three variables as follows:

      \( r_{12.3} = \frac{r_{12} - r_{13}r_{23}}{\sqrt{(1 - r_{13}^2)(1 - r_{23}^2)}} \)

    with rxy denoting the correlation between x and y.

    As with the standard correlation coefficient, a value of +1 indicates a perfect positive linear relationship, a value of -1 indicates a perfect negative linear relationship, and a value of 0 indicates no linear relationship.

    It may be of interest to determine if the partial correlation is significantly different than 0. The CDF value for this test is

      CDF = FCDF(VAL,1,N-3)

    where FCDF is the F cumulative distribution function with 1 and N - 3 degrees of freedom (N is the number of observations) and VAL = ABS((N-3)*R**2/(1 - R**2)) with R denoting the computed partial correlation. The pvalue is 1 - CDF.

Syntax 1:
    LET <par> = PARTIAL CORRELATION <y1> <y2> <y3>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable;
                <y2> is the second response variable;
                <y3> is the third response variable;
                <par> is a parameter where the computed partial correlation is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Syntax 2:
    LET <par> = PARTIAL CORRELATION ABSOLUTE VALUE <y1> <y2> <y3>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable;
                <y2> is the second response variable;
                <y3> is the third response variable;
                <par> is a parameter where the computed partial correlation absolute value is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the absolute value of the partial correlation coefficient. This is typically used in screening applications where there is an interest in identifying high magnitude correlations regardless of the direction of the correlation.

Syntax 3:
    LET <par> = PARTIAL CORRELATION PVALUE <y1> <y2> <y3>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable;
                <y2> is the second response variable;
                <y3> is the third response variable;
                <par> is a parameter where the computed partial correlation pvalue is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the pvalue (described above) of the partial correlation.

Syntax 4:
    LET <par> = PARTIAL CORRELATION CDF <y1> <y2> <y3>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable;
                <y2> is the second response variable;
                <y3> is the third response variable;
                <par> is a parameter where the computed partial correlation cdf is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the cdf (described above) of the partial correlation.

Examples:
    LET A = PARTIAL CORRELATION Y1 Y2 Z
    LET A = PARTIAL CORRELATION Y1 Y2 Z SUBSET TAG > 2
    LET A = PARTIAL CORRELATION ABSOLUTE VALUE Y1 Y2 Z
    LET A = PARTIAL CORRELATION PVALUE Y1 Y2 Z
    LET A = PARTIAL CORRELATION CDF Y1 Y2 Z
Note:
    The three variables must have the same number of elements.
Note:
    Dataplot statistics can be used in a number of commands. For details, enter

Default:
    None
Synonyms:
    None
Related Commands: Reference:
    Conover (1999), "Practical Nonparametric Statistics," Third Edition, Wiley, p. 327.

    Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80: An Interpretive System for Statistical and Numerical Data Analysis," NBS Special Publication 701.

Applications:
    Linear Regression
Implementation Date:
    2012/06
Program:
     
    .  This data is from page 202 of
    .
    .  Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
    .  An Interpretive System for Statistical and Numerical
    .  Data Analysis," NBS Special Publication 701.
    .
    .  Original source of the data is from
    .  Draper and Smith (1981), "Applied Regression Analysis",
    .  Wiley, p. 373.
    .
    dimension 40 columns
    .
    read matrix m
    42.2  11.2  31.9  167.1
    48.6  10.6  13.2  174.4
    42.6  10.6  28.7  160.8
    39.0  10.4  26.1  162.0
    34.7   9.3  30.1  140.8
    44.5  10.8   8.5  174.6
    39.1  10.7  24.3  163.7
    40.1  10.0  18.6  174.5
    45.9  12.0  20.4  185.7
    end of data
    .
    set write decimals 4
    let c1 = partial correlation m1 m2 m3
    let c2 = partial correlation absolute value m1 m2 m3
    let c3 = partial correlation cdf m1 m2 m3
    let c4 = partial correlation pvalue m1 m2 m3
    print c1 c2 c3 c4
        
    The following output is generated.
     
     PARAMETERS AND CONSTANTS--
    
        C1      --         0.7442
        C2      --         0.7442
        C3      --         0.9767
        C4      --         0.0342
        

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 12/19/2012
Last updated: 09/14/2018

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