pool_cor Calculates the pooled correlation coefficient and Confidence intervals.

pool_cor(
  data,
  conf.level = 0.95,
  dfcom = NULL,
  statistic = TRUE,
  df_small = TRUE,
  approxim = "tdistr"
)

Arguments

data

An object of class 'mistats' ('Multiply Imputed Statistical Analysis'.) or a m x 2 matrix with C-index values and standard errors in the first and second column. For the latter option dfcom has to be provided.

conf.level

conf.level Confidence level of the confidence intervals.

dfcom

Number of completed-data analysis degrees of freedom. Default number is taken from function cindex

statistic

if TRUE (default) the test statistic and p-value are provided, if FALSE these are not shown. See details.

df_small

if TRUE (default) the (Barnard & Rubin) small sample correction for the degrees of freedom is applied, if FALSE the old number of degrees of freedom is calculated.

approxim

if "tdistr" a t-distribution is used (default), if "zdistr" a z-distribution is used to derive a p-value for the test statistic.

Value

An object of class mipool from which the following objects can be extracted:

  • cor correlation coefficient

  • SE standard error

  • t t-value (for confidence interval)

  • low_r lower limit of confidence interval

  • high_r upper limit of confidence interval

  • statistic test statistic

  • pval p-value

Details

Rubin's Rules are used for pooling. The correlation coefficient is first transformed using Fisher z transformation (function cor2fz) before pooling and finally back transformed (function fz2cor). The test statistic and p-values are obtained using the Fisher z transformation.

See also

Author

Martijn Heymans, 2022

Examples


 imp_dat <- df2milist(lbpmilr, impvar="Impnr")
 res_stats <- with(data=imp_dat,
  expr = cor_est(y=BMI, x=Age))
 res <- pool_cor(res_stats)
 res
#>            Cor         SE        t  95 CI low 95 CI high statistic       pval
#> [1,] 0.1340606 0.08087045 1.975602 -0.0248902  0.2864001  1.667759 0.09741043
#> attr(,"class")
#> [1] "mipool"