bci.r: b and ci to r

bci.rR Documentation

b and ci to r

Description

regression coefficient and confidence interval to correlation coefficient: b and ci -> t -> r
unadjusted t-statistics estimate bivariate correlation coefficient (enter k = 1)
adjusted t-statistics (e.g., from a regression) estimate partial correlation coefficient (aloe & thompson, 2013).

Usage

bci.r(b, cil, ciu, n, k, result = c("cil", "ciu", "avg", "marge"))

Arguments

b

the regression coefficient (untransformed only, see other functions e.g., expb.r() for transformed coefficients)

cil

the lower bound of the 95 confidence interval

ciu

the upper bound of the 95 confidence interval

n

the sample size

k

the total number of predictors, enter k = 1 if bivariate

Examples

bci.r(.156, .10, .225, 166, 3)
dat %>% mutate (r_from_bci = bci.r(reg_coef, reg_lowerci, reg_upperci, reg_n, reg_predictors)) -> dat


phoebehlam/michaela documentation built on Oct. 23, 2024, 4:10 p.m.