delta2rho {BivUnifBin}R Documentation

Bivariate Binary Data and its Connection to Bivariate Uniform Data

Description

This function calculates algorithmic rho given delta, simulates bivariate uniform data with the calculated rho using genbivunif.a, dichotomizes the data based on p1 and p2 to generate bivariate binary data, and calculates the algorithmic and empirical correlation (delta) of the bivariate binary data as described in Demirtas (2014).

Usage

delta2rho(N=10000, p1, p2, delta, print.cor=TRUE)

Arguments

N

The sample size for the data to be simulated. Default is 10,000.

p1

The expected value of the first binary variable w1.

p2

The expected value of the second binary variable w2.

delta

Theoretical correlation for the bivariate binary data to be simulated.

print.cor

Option to print correlation results. Default is TRUE.

Value

A list of length 5 containing simulated bivariate uniform data, binary data derived from dichotomizing the uniform data, correlation of the binary data specified by the user, empirical correlation of the binary data, and algorithmic correlation of the uniform data, titled unif.dat, bin.dat, specified.delta, empirical.delta, and algorithmic.rho, respectively.

See Also

genbivunif.a

Examples

set.seed(147)
res.d2r<-delta2rho(N=10000, p1=0.4, p2=0.7, delta=0.5)
#"Specified delta is 0.5, empirical delta is 0.488197, and algorithmic rho is 0.909093."

[Package BivUnifBin version 1.3.3 Index]