# partial.cor: Partial Correlations In RcmdrMisc: R Commander Miscellaneous Functions

## Description

Computes a matrix of partial correlations between each pair of variables controlling for the others.

## Usage

 `1` ```partial.cor(X, tests=FALSE, use=c("complete.obs", "pairwise.complete.obs")) ```

## Arguments

 `X` data matrix. `tests` show two-sided p-value and p-value adjusted for multiple testing by Holm's method for each partial correlation? `use` observations to use to compute partial correlations, default is `"complete.obs"`.

## Value

Returns the matrix of partial correlations, optionally with adjusted and unadjusted p-values.

## Author(s)

John Fox [email protected]

`cor`

## Examples

 ```1 2 3``` ``` data(DavisThin, package="car") partial.cor(DavisThin) partial.cor(DavisThin, tests=TRUE) ```

### Example output

```Loading required package: car

Partial correlations:
DT1      DT2     DT3      DT4     DT5     DT6      DT7
DT1 0.00000  0.03573 0.14209  0.14286 0.01960 0.03525  0.03575
DT2 0.03573  0.00000 0.18503  0.13534 0.20693 0.40200 -0.15650
DT3 0.14209  0.18503 0.00000  0.16761 0.28663 0.07136  0.40139
DT4 0.14286  0.13534 0.16761  0.00000 0.04146 0.14144 -0.07976
DT5 0.01960  0.20693 0.28663  0.04146 0.00000 0.20628  0.13224
DT6 0.03525  0.40200 0.07136  0.14144 0.20628 0.00000  0.33582
DT7 0.03575 -0.15650 0.40139 -0.07976 0.13224 0.33582  0.00000

Number of observations: 191

Partial correlations:
DT1      DT2     DT3      DT4     DT5     DT6      DT7
DT1 0.00000  0.03573 0.14209  0.14286 0.01960 0.03525  0.03575
DT2 0.03573  0.00000 0.18503  0.13534 0.20693 0.40200 -0.15650
DT3 0.14209  0.18503 0.00000  0.16761 0.28663 0.07136  0.40139
DT4 0.14286  0.13534 0.16761  0.00000 0.04146 0.14144 -0.07976
DT5 0.01960  0.20693 0.28663  0.04146 0.00000 0.20628  0.13224
DT6 0.03525  0.40200 0.07136  0.14144 0.20628 0.00000  0.33582
DT7 0.03575 -0.15650 0.40139 -0.07976 0.13224 0.33582  0.00000

Number of observations: 191

Pairwise two-sided p-values:
DT1    DT2    DT3    DT4    DT5    DT6    DT7
DT1        0.6282 0.0530 0.0518 0.7906 0.6329 0.6281
DT2 0.6282        0.0115 0.0655 0.0046 <.0001 0.0329
DT3 0.0530 0.0115        0.0222 <.0001 0.3331 <.0001
DT4 0.0518 0.0655 0.0222        0.5742 0.0541 0.2792
DT5 0.7906 0.0046 <.0001 0.5742        0.0047 0.0720
DT6 0.6329 <.0001 0.3331 0.0541 0.0047        <.0001
DT7 0.6281 0.0329 <.0001 0.2792 0.0720 <.0001

Adjusted p-values (Holm's method)
DT1    DT2    DT3    DT4    DT5    DT6    DT7
DT1        1.0000 0.6210 0.6210 1.0000 1.0000 1.0000
DT2 1.0000        0.1719 0.6210 0.0782 <.0001 0.4279
DT3 0.6210 0.1719        0.3110 0.0013 1.0000 <.0001
DT4 0.6210 0.6210 0.3110        1.0000 0.6210 1.0000
DT5 1.0000 0.0782 0.0013 1.0000        0.0782 0.6210
DT6 1.0000 <.0001 1.0000 0.6210 0.0782        <.0001
DT7 1.0000 0.4279 <.0001 1.0000 0.6210 <.0001
```

RcmdrMisc documentation built on April 2, 2018, 5:04 p.m.