phi2tetra: Convert a phi coefficient to a tetrachoric correlation
Description
Given a phi coefficient (a Pearson r calculated on two dichotomous variables), and the marginal frequencies (in percentages), what is the corresponding estimate of the tetrachoric correlation?
Given a two x two table of counts
lll{
a b
c d
}
The phi coefficient is (a - (a+b)*(a+c))/sqrt((a+b)(a+c)(b+d)(c+c)).
This function reproduces the cell entries for specified marginals and then calls John Fox's polychor function.