powered by
Computes the joint probability \(P(X = 1, Y = 1)\) for two binary vectors `x` and `y`. Rows with missing values in either vector are excluded.
joint(y, x)
A numeric scalar giving the joint probability that both `x = 1` and `y = 1`, calculated as the joint count divided by the number of complete cases.
A binary outcome vector (0/1 or logical). Must be the same length as `x`.
A binary predictor vector (0/1 or logical). Must be the same length as `y`.
joint(misimdata$y,misimdata$x1)
Run the code above in your browser using DataLab