# 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)
Run the code above in your browser using DataLab