Learn R Programming

SciencesPo (version 1.02.12)

rstack: Stacked Table With Correlations

Description

Pearson's product-moment coefficient is the well known degree to which two or more variables are linearly associated. In a two-dimensional table, the degree of correlation among the variables is quantified by the correlation coefficient.

Usage

rstack(m)

Arguments

m
is a square matrix

Value

  • An table or a data.frame containing correlations for m

Details

The function generates a flatten table of correlations. If necessary, typing cor(t(x)) will coerce x properly to a square matrix format.

References

Spiegel, M. R. (1992) Correlation Theory. in: Theory and Problems of Probability and Statistics, 2nd ed. New York: McGraw-Hill, pp. 294--323.

See Also

rprob

Examples

Run this code
data(nerlove63)
(table <- rprob(nerlove63) )
rstack(table)

Run the code above in your browser using DataLab