pps2ps {CorrToolBox} R Documentation

## Computation of the Polyserial Correlation from the Point-Polyserial Correlation

### Description

This function computes the polyserial correlation between two continuous variables given the correlation after ordinalization of one of the variables (point-polyserial correlation) as seen in Demirtas and Hedeker (2016). Before computation of the polyserial correlation, the specified point-polyserial correlation is compared to the lower and upper correlation bounds of the continuous variable and ordinalized variable using the generate, sort and correlate (GSC) algorithm in Demirtas and Hedeker (2011).

### Usage

pps2ps(pps, ord.var, cont.var, cats, p=NULL, cutpoint=NULL)


### Arguments

 pps The point-polyserial correlation. ord.var A numeric vector of the continuous variable before ordinalization. cont.var A numeric vector of the the continuous variable that is not transformed. cats A numeric vector of the categories in the ordinalization of ord.var. p A numeric vector of the marginal probabilities corresponding to each category in cats. The marginal probabilities must sum to 1. Either p or cutpoint should be specified. cutpoint A numeric vector of the cutpoints used to define the categories cats. Either p or cutpoint should be specified.

### Value

The polyserial correlation.

### References

Demirtas, H. and Hedeker, D. (2011). A practical way for computing approximate lower and upper correlation bounds. The American Statistician, 65(2), 104-109.

Demirtas, H. and Hedeker, D. (2016). Computing the point-biserial correlation under any underlying continuous distribution. Communications in Statistics-Simulation and Computation, 45(8), 2744-2751.

ordY, mps2cps

### Examples

set.seed(234)
y1<-rweibull(n=100000, scale=1, shape=25)

gaussmix <- function(n,m1,m2,s1,s2,pi) {
I <- runif(n)<pi
rnorm(n,mean=ifelse(I,m1,m2),sd=ifelse(I,s1,s2))
}
y2<-gaussmix(n=100000, m1=0, s1=1, m2=2, s2=1, pi=0.5)

pps2ps(pps=0.3, ord.var=y1, cont.var=y2, cats=c(1,2,3,4), p=c(0.4, 0.3, 0.2, 0.1))
pps2ps(pps=0.3, ord.var=y1, cont.var=y2, cats=c(1,2,3,4), cutpoint=c(0.97341, 1.00750, 1.03421))


[Package CorrToolBox version 1.6.4 Index]