Learn R Programming

MOTE (version 1.2.2)

d_dep_t_diff_t: Cohen's d from t for Paired Samples Using the SD of Difference Scores

Description

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.

Usage

d_dep_t_diff_t(t_value, t = NULL, n, a = 0.05)

Value

A list with the following elements:

d

Cohen's \(d_z\).

dlow

Lower limit of the \((1-\alpha)\) confidence interval for \(d_z\).

dhigh

Upper limit of the \((1-\alpha)\) confidence interval for \(d_z\).

n

Sample size.

df

Degrees of freedom (\(n - 1\)).

t

t-statistic.

p

p-value.

estimate

APA-style formatted string for reporting \(d_z\) and its CI.

statistic

APA-style formatted string for reporting the t-statistic and p-value.

Arguments

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).

Details

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.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab