biserial_cor: Biserial Correlation

Description Usage Arguments Details Value References Examples

Description

Point-Biserial correlation coefficient is a correlation coefficient used when one variable is continuous and the other variable is dichotomous. Taken from ltm::biserial_cor

Usage

1
biserial_cor(x,y, use = c("all.obs", "complete.obs"), level = 1)

Arguments

x

a numeric vector representing the continuous variable.

y

a numeric vector representing the dichotomous variable.

use

is a option for the use of missing values.

level

which level of y to use.

Details

It is calculated by applying the Pearson correlation coefficient to the case where one of the variables has dichotomous nature.
It is calculated as

r_{xy} = (\bar{x}_p - \bar{x}_q / S_x)*√{pq}

Where p is the proportion of subjects with one of the two possible values of the variable Y, q is the proportion of subjects with the other possible value,

\bar{x}_p

and

\bar{x}_q

is the average X subjects whose proportion is p and q respectively, and

S_x

is the standard deviation of all subjects X. This function was adapted from ltm_1.0 package.

Value

The value of the point-biserial correlation.

References

U.Olsson, F.Drasgow, and N.Dorans (1982). The polyserial correlation coefficient. Psychometrika, 47:337-347.

Cox. N.R. (1974). Estimation of the Correlation between a Continuous and a Discrete Variable. Biometrics, 30:171-178.

Examples

1
2
3
4
5
## Not run: 
data <- simulate_dichotomous(size.cluster = c(10),sample.size=1000)
biserial_cor(rowSums(data$data), data$data[,1])

## End(Not run)

SICSresearch/LatentREGpp documentation built on May 9, 2019, 11:13 a.m.