| d_ind_t | R Documentation |
Compute Cohen's d_s for between-subjects designs and a noncentral-t
confidence interval using the **pooled standard deviation**
as the denominator.
d_ind_t(m1, m2, sd1, sd2, n1, n2, a = 0.05)
m1 |
Mean of group one. |
m2 |
Mean of group two. |
sd1 |
Standard deviation of group one. |
sd2 |
Standard deviation of group two. |
n1 |
Sample size of group one. |
n2 |
Sample size of group two. |
a |
Significance level (alpha) for the confidence interval. Must be in (0, 1). |
The pooled standard deviation is:
s_{pooled} = \sqrt{ \frac{ (n_1 - 1)s_1^2 + (n_2 - 1)s_2^2 }
{n_1 + n_2 - 2} }
Cohen's d_s is then:
d_s = \frac{m_1 - m_2}{s_{pooled}}
The corresponding t-statistic is:
t = \frac{m_1 - m_2}{ \sqrt{ s_{pooled}^2/n_1 + s_{pooled}^2/n_2 }}
See the online example for additional context: Learn more on our example page.
A list with the following elements:
Cohen's d_s.
Lower limit of the (1-\alpha) confidence interval
for d_s.
Upper limit of the (1-\alpha) confidence interval
for d_s.
Group means.
Standard deviations for each group.
Standard errors for each group mean.
Confidence interval bounds for each group mean.
Pooled standard deviation.
Pooled standard error.
Group sample sizes.
Degrees of freedom (n_1 - 1 + n_2 - 1).
t-statistic.
p-value.
APA-style formatted string for reporting
d_s and its CI.
APA-style formatted string for reporting the t-statistic and p-value.
# The following example is derived from the "indt_data" dataset
# included in MOTE.
# A forensic psychologist examined whether being hypnotized during recall
# affects how well a witness remembers facts about an event.
t.test(correctq ~ group, data = indt_data)
# Direct entry of summary statistics:
d_ind_t(m1 = 17.75, m2 = 23, sd1 = 3.30,
sd2 = 2.16, n1 = 4, n2 = 4, a = .05)
# Equivalent shorthand:
d_ind_t(17.75, 23, 3.30, 2.16, 4, 4, .05)
# Using raw data from the dataset:
d_ind_t(mean(indt_data$correctq[indt_data$group == 1]),
mean(indt_data$correctq[indt_data$group == 2]),
sd(indt_data$correctq[indt_data$group == 1]),
sd(indt_data$correctq[indt_data$group == 2]),
length(indt_data$correctq[indt_data$group == 1]),
length(indt_data$correctq[indt_data$group == 2]),
.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.