| d_to_r | R Documentation |
**Note on function and output names:** This effect size translation is now implemented with the snake_case function name 'd_to_r()' to follow modern R style guidelines. The original dotted version 'd.to.r()' is still available as a wrapper for backward compatibility, and both functions return the same list. The returned object includes both the original element names (e.g., 'r', 'rlow', 'rhigh', 'R2', 'R2low', 'R2high', 'se', 'n', 'dfm', 'dfe', 't', 'F', 'p', 'estimate', 'estimateR2', 'statistic') and newer snake_case aliases (e.g., 'r_lower_limit', 'r_upper_limit', 'r2_value', 'r2_lower_limit', 'r2_upper_limit', 'se_value', 'sample_size', 'degrees_freedom_model', 'degrees_freedom_error', 't_value', 'f_value', 'p_value', 'estimate_r', 'estimate_r2'). New code should prefer 'd_to_r()' and the snake_case output names, but existing code using the older names will continue to work.
d_to_r(d, n1, n2, a = 0.05)
d.to.r(d, n1, n2, a = 0.05)
d |
Effect size statistic. |
n1 |
Sample size for group one. |
n2 |
Sample size for group two. |
a |
Significance level. |
Calculates r from d and then translates r to r2 to calculate the non-central confidence interval for r2 using the F distribution.
The correlation coefficient (r) is calculated by dividing Cohen's d
by the square root of the total sample size squared, divided
by the product of the sample sizes of group one and group two.
r = \frac{d}{\sqrt{d^2 + \frac{(n_1 + n_2)^2}{n_1 n_2}}}
Learn more on our example page.
Provides the effect size (correlation coefficient) with associated confidence intervals, the t-statistic, F-statistic, and other estimates appropriate for d to r translation. Note this CI is not based on the traditional r-to-z transformation but rather non-central F using the ci.R function from MBESS.
Correlation coefficient.
Lower level confidence interval for r.
Upper level confidence interval for r.
Coefficient of determination.
Lower level confidence interval of R2.
Upper level confidence interval of R2.
Standard error.
Sample size.
Degrees of freedom of mean.
Degrees of freedom error.
t-statistic.
F-statistic.
p-value.
The r statistic and confidence interval in APA style for markdown printing.
The R^2 statistic and confidence
interval in APA style for markdown printing.
The t-statistic in APA style for markdown printing.
# The following example is derived from the "indt_data"
# dataset, included in the MOTE library.
# A forensic psychologist conducted a study to examine whether
# being hypnotized during recall affects how well a witness
# can remember facts about an event. Eight participants
# watched a short film of a mock robbery, after which
# each participant was questioned about what he or she had
# seen. The four participants in the experimental group
# were questioned while they were hypnotized. The four
# participants in the control group received the same
# questioning without hypnosis.
# Contrary to the hypothesized result, the group that underwent
# hypnosis were significantly less accurate while reporting
# facts than the control group with a large effect size, t(6) = -2.66,
# p = .038, d_s = -1.88.
d_to_r(d = -1.88, n1 = 4, n2 = 4, a = .05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.