Converts robust effect size index (S) to R^2, the partial coefficient of determination, using the formula from Vandekar, Tao, & Blume (2020).
S2Rsq(S)
Arguments
S: Numeric, the robust effect size index.
Returns
Returns an estimate of R^2 based on the RESI
Details
The formula for the conversion is:
R2=S2/(1+S2)
Examples
# fit a simple linear regression with a binary predictormod = lm(charges ~ sex, data = RESI::insurance)# calculate t-valuet = summary(mod)$coefficients[2,"t value"]# calculate RESI (S)S = t2S(t, n =1338, rdf =1336)# convert S to R^2S2Rsq(S)