regp.r: p to r

regp.rR Documentation

p to r

Description

regression p-values (or other t distribution-based p-values) to correlation coefficient
estimates t-statistics and then correlation coefficients

Usage

regp.r(p, n, k, dir)

Arguments

p

the p-value

n

the sample size

k

the number of predictors

dir

empirical direction: +1 for positive associaitons and -1 for negative associations

Examples

regp.r(.023, 100, 3, 1)
dat %>% mutate (r_from_pval = regp.r(reg_pval, reg_n, reg_predictors, reg_emp_direction)) -> dat


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