View source: R/d_dep_t_diff_t.R
| d_dep_t_diff_t | R Documentation |
Compute Cohen's d_z from a paired-samples t-statistic and provide a
noncentral-t confidence interval, using the **standard deviation of the
difference scores** as the denominator.
d_dep_t_diff_t(t_value, t = NULL, n, a = 0.05)
t_value |
t-statistic from a paired-samples t-test. |
t |
for backwards compatibility, you can also give t. |
n |
Sample size (number of paired observations). |
a |
Significance level (alpha) for the confidence interval. Must be in (0, 1). |
For paired designs, d_z can be obtained directly from the t-statistic:
d_z = \frac{t}{\sqrt{n}},
where n is the number of paired observations (df = n-1). The
(1-\alpha) confidence interval for d_z is derived from the
noncentral t distribution for the observed t and df.
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.
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 before and after an intervention.
# Higher scores indicate stronger endorsement.
scifi <- t.test(dept_data$before, dept_data$after, paired = TRUE)
# The t-test value was 1.43. You can type in the numbers directly,
# or refer to the dataset, as shown below.
d_dep_t_diff_t(t_value = 1.43, n = 7, a = .05)
d_dep_t_diff_t(t_value = scifi$statistic,
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.