Suppose I want 2 binary data vectors with specified phi coefficients, how did I model it with R?
For example, how can I create two vectors of type x and y specified vector length with a coefficient of 0.79
> x = c(1, 1, 0, 0, 1, 0, 1, 1, 1) > y = c(1, 1, 0, 0, 0, 0, 1, 1, 1) > cor(x,y) [1] 0.7905694
source share