A set of deprecated functions that have replaced by
Some older correlation matrices were reported as matrices of Phi or of Yule correlations. That is, correlations were found from the two by two table of counts:
Yule Q is (ad - bc)/(ad+bc).
With marginal frequencies of a+b, c+d, a+c, b+d.
Given a square matrix of such correlations, and the proportions for each variable that are in the a + b cells, it is possible to reconvert each correlation into a two by two table and then estimate the corresponding polychoric correlation (using John Fox's polychor function.
1 2 3
a matrix of phi or Yule coefficients
A vector of marginal frequencies
These functions call
phi2poly for each cell of the matrix. See those functions for more details. See
phi.demo for an example.
A matrix of correlations
1 2 3 4 5 6 7
#demo <- phi.demo() #compare the phi (lower off diagonal and polychoric correlations (upper off diagonal) #show the result from poly.mat #round(demo$tetrachoric$rho,2) #show the result from phi2poly #tetrachorics above the diagonal, phi below the diagonal #round(demo$phis,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.