Yule {psych} R Documentation

## From a two by two table, find the Yule coefficients of association, convert to phi, or tetrachoric, recreate table the table to create the Yule coefficient.

### Description

One of the many measures of association is the Yule coefficient. Given a two x two table of counts

 a b R1 c d R2 C1 C2 \ tab n

Conceptually, this is the number of pairs in agreement (ad) - the number in disagreement (bc) over the total number of paired observations. Warren (2008) has shown that Yule's Q is one of the “coefficients that have zero value under statistical independence, maximum value unity, and minimum value minus unity independent of the marginal distributions" (p 787).
ad/bc is the odds ratio and Q = (OR-1)/(OR+1)
Yule's coefficient of colligation is Y = (sqrt(OR) - 1)/(sqrt(OR)+1) Yule.inv finds the cell entries for a particular Q and the marginals (a+b,c+d,a+c, b+d). This is useful for converting old tables of correlations into more conventional `phi` or tetrachoric correlations `tetrachoric`
Yule2phi and Yule2tetra convert the Yule Q with set marginals to the correponding phi or tetrachoric correlation.

### Usage

```Yule(x,Y=FALSE)  #find Yule given a two by two table of frequencies
#find the frequencies that produce a Yule Q given the Q and marginals
Yule.inv(Q,m,n=NULL)
#find the phi coefficient that matches the Yule Q given the marginals
Yule2phi(Q,m,n=NULL)
Yule2tetra(Q,m,n=NULL,correct=TRUE)
#Find the tetrachoric correlation given the Yule Q and the marginals
#(deprecated) Find the tetrachoric correlation given the Yule Q and the marginals
Yule2poly(Q,m,n=NULL,correct=TRUE)
```

### Arguments

 `x` A vector of four elements or a two by two matrix `Y` Y=TRUE return Yule's Y coefficient of colligation `Q` Either a single Yule coefficient or a matrix of Yule coefficients `m` The vector c(R1,C2) or a two x two matrix of marginals or a four element vector of marginals. The preferred form is c(R1,C1) `n` The number of subjects (if the marginals are given as frequencies `correct` When finding a tetrachoric correlation, should small cell sizes be corrected for continuity. See `{link{tetrachoric}` for a discussion.

### Details

Yule developed two measures of association for two by two tables. Both are functions of the odds ratio

### Value

 `Q` The Yule Q coefficient `R` A two by two matrix of counts `result` If given matrix input, then a matrix of phis or tetrachorics

### Note

Yule.inv is currently done by using the optimize function, but presumably could be redone by solving a quadratic equation.

William Revelle

### References

Yule, G. Uday (1912) On the methods of measuring association between two attributes. Journal of the Royal Statistical Society, LXXV, 579-652

Warrens, Matthijs (2008), On Association Coefficients for 2x2 Tables and Properties That Do Not Depend on the Marginal Distributions. Psychometrika, 73, 777-789.

See Also as `phi`, `tetrachoric`, `Yule2poly.matrix`, `Yule2phi.matrix`

### Examples

```Nach <- matrix(c(40,10,20,50),ncol=2,byrow=TRUE)
Yule(Nach)
Yule.inv(.81818,c(50,60),n=120)
Yule2phi(.81818,c(50,60),n=120)
Yule2tetra(.81818,c(50,60),n=120)
phi(Nach)  #much less
#or express as percents and do not specify n
Nach <- matrix(c(40,10,20,50),ncol=2,byrow=TRUE)
Nach/120
Yule(Nach)
Yule.inv(.81818,c(.41667,.5))
Yule2phi(.81818,c(.41667,.5))
Yule2tetra(.81818,c(.41667,.5))
phi(Nach)  #much less
```

[Package psych version 1.4.5 Index]