This function displays d-g corrected and the non-central confidence interval for independent t.
g.ind.t(m1, m2, sd1, sd2, n1, n2, a = 0.05)
mean group one
mean group two
standard deviation group one
standard deviation group two
sample size group one
sample size group two
significance level
D-g corrected with associated confidence intervals, the confidence intervals associated with the means of each group, standard deviations of the means for each group, relevant statistics.
d-g corrected effect size
lower level confidence interval d-g corrected
upper level confidence interval d-g corrected
mean group one
standard deviation of group one
standard error of group one
lower level confidence interval of mean one
upper level confidence interval of mean one
mean two
standard deviation of mean two
standard error of mean two
lower level confidence interval of mean two
upper level confidence interval of mean two
pooled standard deviation
pooled standard error
g corrected
size of sample one
size of sample two
degrees of freedom
t-statistic
p-value
the d statistic and confidence interval in APA style for markdown printing
the t-statistic in APA style for markdown printing
The correction is calculated by dividing three by the sum of both sample sizes after multiplying by four and subtracting nine. This amount is deducted from one.
correction = 1 - (3 / (4 * (n1 + n2) - 9))
D-g corrected is calculated by substracting mean two from mean one, dividing by the pooled standard deviation which is multiplied by the correction above.
d_g corrected = ((m1 - m2) / spooled) * correction
# NOT RUN {
#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 recieved 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.
# }
Run the code above in your browser using DataLab