psych (version 1.3.12)

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.

Usage

phi2tetra(ph,m,n=NULL,correct=TRUE)
phi2poly(ph,cp,cc,n=NULL,correct=TRUE) #deprecated

Arguments

ph
phi
m
a vector of the selection ratio and probability of criterion. In the case where ph is a matrix, m is a vector of the frequencies of the selected cases
correct
When finding tetrachoric correlations, should we correct for continuity for small marginals. See tetrachoric for a discussion.
n
If the marginals are given as frequencies, what was the total number of cases?
cp
probability of the predictor -- the so called selection ratio
cc
probability of the criterion -- the so called success rate.

Value

  • a tetrachoric correlation

Details

requires the mvtnorm package

See Also

tetrachoric, Yule2phi.matrix, phi2poly.matrix

Examples

Run this code
phi2tetra(.3,c(.5,.5))
#phi2poly(.3,.3,.7)

Run the code above in your browser using DataLab