Description Usage Arguments Details Value Author(s) See Also Examples

When reporting correlation matrices for two samples (e.g., males and females), it is convenient to show them as one matrix, with entries below the diagonal representing one matrix, and entries above the diagonal the other matrix. It is also useful to compare a correlation matrix with the residuals from a fitted (e.g., factor) model.

1 | ```
lowerUpper(lower, upper=NULL, diff=FALSE)
``` |

`lower` |
A square matrix |

`upper` |
A square matrix of the same size as the first (if omitted, then the matrix is converted to two symmetric matrices). |

`diff` |
Find the difference between the first and second matrix and put the results in the above the diagonal entries. |

If just one matrix is provided (i.e., upper is missing), it is decomposed into two square matrices, one equal to the lower off diagonal entries, the other to the upper off diagonal entries. In the normal case two symmetric matrices are provided and combined into one non-symmetric matrix with the lower off diagonals representing the lower matrix and the upper off diagonals representing the upper matrix.

If diff is true, the upper off diagonal matrix reflects the differences between the two matrices.

Either one matrix or a list of two

William Revelle

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
b1 <- Bechtoldt.1
b2 <- Bechtoldt.2
b12 <- lowerUpper(b1,b2)
cor.plot(b12)
diff12 <- lowerUpper(b1,b2,diff=TRUE)
corPlot(t(diff12),numbers=TRUE,main="Bechtoldt1 and the differences from Bechtoldt2")
#Compare r and partial r
lower <- lowerCor(sat.act)
upper <- partial.r(sat.act)
both = lowerUpper(lower,upper)
corPlot(both,numbers=TRUE,main="r and partial r for the sat.act data set")
#now show the differences
both = lowerUpper(lower,upper,diff=TRUE)
corPlot(both,numbers=TRUE,main="Differences between r and partial r for the sat.act data set")
``` |

```
gendr edctn age ACT SATV SATQ
gender 1.00
education 0.09 1.00
age -0.02 0.55 1.00
ACT -0.04 0.15 0.11 1.00
SATV -0.02 0.05 -0.04 0.56 1.00
SATQ -0.17 0.03 -0.03 0.59 0.64 1.00
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.