cor_bin {ebdm} | R Documentation |
Estimate the Joint Distribution of Two Binary Variables from Marginal Summaries
Description
Performs maximum likelihood estimation (MLE) of the joint distribution of two binary variables using only marginal summary data from multiple studies.
Usage
cor_bin(ni, xi, yi, ci_method = c("none", "normal", "lr"))
Arguments
ni |
Numeric vector. Sample sizes for each dataset. |
xi |
Numeric vector. Count of observations where variable 1 equals 1. |
yi |
Numeric vector. Count of observations where variable 2 equals 1. |
ci_method |
Character string. Method for confidence interval computation.
Options are |
Value
A named list with point estimates, variance, standard error, and confidence interval (if requested).
- p1_hat
Estimated marginal probability for variable 1.
- p2_hat
Estimated marginal probability for variable 2.
- p11_hat
Estimated joint probability.
- var_hat
Estimated variance of
p11_hat
.- sd_hat
Standard error of
p11_hat
.- ci
Confidence interval for
p11_hat
, if requested.
Examples
data(bin_example)
cor_bin(bin_example$ni, bin_example$xi, bin_example$yi, ci_method = "lr")