t.r: t to r

t.rR Documentation

t to r

Description

t-statistics to correlation coefficient
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

## S3 method for class 'r'
t(t, n, k, dir)

Arguments

t

the t-statistics

n

the sample size

k

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

dir

empirical direction: +1 or -1. articles sometimes report t-statistics in absolute value, may be prudent to check when extracting stats
if the reported t-statistics is positive, read text to ensure it reflects a positive association, enter the t as is and enter dir = 1 if so
if the reported t-statistics is positive, but text suggests a negative association, enter the t as is and enter dir = -1
if the reported t-statistics is negative, you can simply enter the negative t-value and enter dir = 1
note: if your t-statistics is computed from taking the ratio of b and se, e.g., using bse.t(), then it should already have empirical direction "built-in" since b is directional itself, so simply enter dir = 1

Examples

t.r(2.14, 100, -1)
dat %>% mutate (r_from_t = t.r(t_stat, analytical_n, direction)) -> dat


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