plotCorCoeff: Plot superimposed histograms of correlation coefficients

Description Usage Arguments Author(s) See Also Examples

Description

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.

Usage

1
	plotCorCoeff(m, idx, col, breaks="Scott", ...)

Arguments

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 hist documentation for info and other options.

...

- Additional parameters to be passed to rect().

Author(s)

Nathan S. Watson-Haigh

See Also

hist

Examples

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)

PCIT documentation built on May 1, 2019, 8:10 p.m.