S2fsq | R Documentation |
Converts robust effect size index (S) to Cohen's f^2 (effect size for multiple regression) using the formula from Vandekar, Tao, & Blume (2020).
S2fsq(S)
S |
Numeric,the robust effect size index. |
The formula for the conversion is:
f^2 = S^2
Returns an estimate of Cohen's f^2 based on the RESI
# fit a linear regression model with continuous outcome and predictor
mod = lm(charges ~ age, data = RESI::insurance)
# obtain t value for calculating RESI
t = summary(mod)$coefficients[2, "t value"]
# calculate RESI
S = t2S(t, n = 1338, rdf = 1336)
# convert to f^2
S2fsq(S)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.