SPSS Statistics

 View Only
Expand all | Collapse all

Non-Parametric Partial Correlation: Code breaking after adding additional covariable?

  • 1.  Non-Parametric Partial Correlation: Code breaking after adding additional covariable?

    Posted Wed May 15, 2024 09:16 PM

    Greetings! I have a syntax file that I run to generate a Spearman partial correlation.

    NONPAR CORR covar1 covar2 var1 var2 var3
        /MISSING = LISTWISE
    /MATRIX OUT(*) .
    
    RECODE rowtype_('RHO'='CORR') .
    
    PARTIAL CORR var1 var2 var3 BY covar1 covar2
        /SIGNIFICANCE = TWOTAIL
        /MISSING = LISTWISE
        /MATRIX IN(*) .
    

    (full credit to Steven Bradburn: How To Perform A Non-Parametric Partial Correlation In SPSS)

     

    After pasting the output into Excel, it looks something like this (minus var3 for simplicity, values made up):

    Correlations
    Control Variables var1 var2 var3
    covar1 covar2 covar3 var1 Correlation 1.000  0.2  0.3
    Significance (2-tailed) .01 0.05 
    df 0 0 1
    var2 Correlation  0.2 1.000  -0.4
    Significance (2-tailed)  .01  0.02
    df 1 0 1

    This normally works very well and only requires minor cleanup for self-comparisons. However, I've run into an issue where adding another covariable (covar4) with no other changes results in an output like this:

    Correlations
    Control Variables var1 var2 var3
    covar1 covar2 covar3 covar4 var1 Correlation 1.000    
    Significance (2-tailed)      
    df 0 0 0
    var2 Correlation   1.000  
    Significance (2-tailed)      
    df 0 0 0

    I am stuck trying to figure out why this is happening. If it helps, all variables involved are numeric. Covar1 and 4 are scales, while covar2 and 3 are nominal.

    Any help figuring this out would be greatly appreciated.



    ------------------------------
    Andrew Pucka
    ------------------------------


  • 2.  RE: Non-Parametric Partial Correlation: Code breaking after adding additional covariable?

    Posted Thu May 16, 2024 05:48 PM
    Edited by Kirill Orlov Thu May 16, 2024 05:49 PM

    I do not see much sense so far in doing this. Why not simply to rank data first and then run Partial Correlations procedure on those data? Spearman is just Pearson correlation computed on ranks, and Partial Correlations expects specifically Pearson r coefficients. There is no thing like "nonparametric partial correlation" in all this - but parametric partial correlations based on data that are the ranks.



    ------------------------------
    Kirill Orlov
    ------------------------------