# Example derived from the "singt_data" dataset included in MOTE.
# A school claims their gifted/honors program outperforms the national
# average (1080). Their students' SAT scores (sample) have mean 1370 and
# SD 112.7.
gift <- t.test(singt_data$SATscore, mu = 1080, alternative = "two.sided")
# Direct entry of summary statistics:
d_single_t(m = 1370, u = 1080, sd = 112.7, n = 14, a = .05)
# Equivalent shorthand:
d_single_t(1370, 1080, 112.7, 14, .05)
# Using values from the t-test object and dataset:
d_single_t(gift$estimate, gift$null.value,
sd(singt_data$SATscore), length(singt_data$SATscore), .05)
Run the code above in your browser using DataLab