Description Usage Arguments Author(s) See Also Examples
Given a complete correlation matrix and a list of linear indices, superimpose the distributions of correlation coefficients, defined by their indices, on top of the distribution of all correlations.
Only data from the upper triangle is used to plot the distributions since a correlation matrix should be symmetrical. This means that any specified indices which fall within the diagonal or the lower triangle are effectively ignored.
1 | plotCorCoeff(m, idx, col, breaks="Scott", ...)
|
m |
- A correlation matrix representing the raw data. |
idx |
- A list of indices for a subset of correlations to be superimposed on the plot. |
col |
- A vector of colours of equal length to idx. These are used to colour each of the distributions specified by the indices in idx. |
breaks |
- Defaults to "Scott", see the |
... |
- Additional parameters to be passed to rect(). |
Nathan S. Watson-Haigh
1 2 3 4 5 6 7 8 9 | data(PCIT)
m <- m[1:200,1:200] # just use a small subset of the data
result <- pcit(m)
op <- par(mfrow=c(2,1))
plotCorCoeff(m, list("PCIT Significant" = idx(result)), col=c("black"))
plotCorCoeff(m, list("PCIT Significant" = idx(result),
"abs(adj) >= 0.7" = which(abs(m) >= 0.7)), col=c("black", "red"))
par(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.