cor_cont {ebdm} | R Documentation |
Estimate the Bivariate Normal Distribution from Marginal Summaries
Description
Estimate the correlation coefficient \rho
(and marginal means / SDs)
of two normally-distributed variables using summary-level data from
multiple independent studies.
Usage
cor_cont(
n,
xbar,
ybar,
s2x = NULL,
s2y = NULL,
method = c("proposed", "weighted"),
ci_method = c("none", "normal", "lr")
)
Arguments
n |
Numeric vector. Sample size of each study. |
xbar , ybar |
Numeric vectors. Sample means of the two variables. |
s2x , s2y |
Numeric vectors. Sample variances; required for |
method |
Character. |
ci_method |
Confidence interval type: |
Value
A list with elements
-
mu_x, mu_y
: estimated marginal means -
sigma_x, sigma_y
: estimated SDs -
rho
: estimated correlation -
se
: standard error ofrho
(proposed only) -
ci
: confidence interval forrho
(if requested)
Examples
data(cont_example)
# Example with full summaries
cor_cont(cont_example$Sample_Size, cont_example$Mean_X, cont_example$Mean_Y,
cont_example$Variance_X, cont_example$Variance_Y, method = "proposed", ci_method = "lr")
# Only means + n, weighted mean method
cor_cont(cont_example$Sample_Size, cont_example$Mean_X, cont_example$Mean_Y, method = "weighted")