g_ind_t: d_g Corrected for Independent t

View source: R/g_ind_t.R

g_ind_tR Documentation

d_g Corrected for Independent t

Description

This function displays d_g (Hedges' g) corrected and the non-central confidence interval for independent t.

Usage

g_ind_t(m1, m2, sd1, sd2, n1, n2, a = 0.05)

g.ind.t(m1, m2, sd1, sd2, n1, n2, a = 0.05)

Arguments

m1

mean group one

m2

mean group two

sd1

standard deviation group one

sd2

standard deviation group two

n1

sample size group one

n2

sample size group two

a

significance level

Details

The small-sample correction factor is:

\mathrm{correction} = 1 - \frac{3}{4(n_1 + n_2) - 9}

d_g is computed as the standardized mean difference multiplied by the correction:

d_g = \frac{m_1 - m_2}{s_{\mathrm{pooled}}} \times \mathrm{correction}

Learn more on our example page.

Value

d

d_g corrected effect size

dlow

lower level confidence interval for d_g

dhigh

upper level confidence interval for d_g

M1

mean of group one

sd1

standard deviation of group one

se1

standard error of group one

M1low

lower level confidence interval of mean one

M1high

upper level confidence interval of mean one

M2

mean of group two

sd2

standard deviation of group two

se2

standard error of group two

M2low

lower level confidence interval of mean two

M2high

upper level confidence interval of mean two

spooled

pooled standard deviation

sepooled

pooled standard error

correction

Hedges' small-sample correction factor

n1

sample size of group one

n2

sample size of group two

df

degrees of freedom (n_1 - 1 + n_2 - 1)

t

t-statistic

p

p-value

estimate

the d_g statistic and confidence interval in APA style for markdown printing

statistic

the t-statistic in APA style for markdown printing

Examples


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

   t.test(correctq ~ group, data = indt_data)

# You can type in the numbers directly, or refer to the dataset,
# as shown below.

    g_ind_t(m1 = 17.75, m2 = 23, sd1 = 3.30,
           sd2 = 2.16, n1 = 4, n2 = 4, a = .05)

    g_ind_t(17.75, 23, 3.30, 2.16, 4, 4, .05)

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

# 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_g = 1.64.


MOTE documentation built on Dec. 15, 2025, 9:06 a.m.