| d_dep_t_diff | R Documentation |
**Note on function and output names:** This effect size is now implemented with the snake_case function name 'd_dep_t_diff()' to follow modern R style guidelines. The original dotted version 'd.dep.t.diff()' 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., 'mdiff', 'Mlow', 'Mhigh', 'sddiff') and newer snake_case aliases (e.g., 'm_diff', 'm_diff_lower_limit', 'm_diff_upper_limit', 'sd_diff'). New code should prefer 'd_dep_t_diff()' and the snake_case output names, but existing code using the older names will continue to work.
d_dep_t_diff(mdiff, sddiff, n, a = 0.05)
d.dep.t.diff(mdiff, sddiff, n, a = 0.05)
mdiff |
Mean of the difference scores. |
sddiff |
Standard deviation of the difference scores. |
n |
Sample size (number of paired observations). |
a |
Significance level (alpha) for the confidence interval. Must be in (0, 1). |
Compute Cohen's d_z and a noncentral-t confidence interval for
repeated-measures (paired-samples) designs using the **standard deviation
of the difference scores** as the denominator.
The effect size is defined as:
d_z = \frac{\bar{X}_D}{s_D}
where \bar{X}_D is the mean of the difference scores and s_D is
the standard deviation of the difference scores.
The corresponding t statistic for the paired-samples t-test is:
t = \frac{\bar{X}_D}{s_D / \sqrt{n}}
See the online example for additional context: Learn more on our example page.
A list with the following elements:
Cohen's d_z.
Lower limit of the (1-\alpha)
confidence interval for d_z.
Upper limit of the (1-\alpha)
confidence interval for d_z.
Mean difference score.
Confidence interval bounds for the mean difference.
Standard deviation of the difference scores.
Standard error of the difference scores.
Sample size.
Degrees of freedom (n - 1).
t-statistic.
p-value.
APA-style formatted string for reporting
d_z and its CI.
APA-style formatted string for reporting the t-statistic and p-value.
# Example derived from the "dept_data" dataset included in MOTE
# Suppose seven people completed a measure of belief in the supernatural
# before and after watching a sci-fi movie.
# Higher scores indicate stronger belief.
t.test(dept_data$before, dept_data$after, paired = TRUE)
# Direct entry of summary statistics:
d_dep_t_diff(mdiff = 1.14, sddiff = 2.12, n = 7, a = .05)
# Equivalent shorthand:
d_dep_t_diff(1.14, 2.12, 7, .05)
# Using raw data from the dataset:
d_dep_t_diff(mdiff = mean(dept_data$before - dept_data$after),
sddiff = sd(dept_data$before - dept_data$after),
n = length(dept_data$before),
a = .05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.