## Posted By

inductivestep on 01/05/14

# Pretest-Posttest-Control Group effect size calculator

/ Published in: Python

Effect size calculator using method described by Morris, S. B. (2007). Estimating Effect Sizes From Pretest-Posttest-Control Group Designs. Organizational Research Methods, 11(2), 364â€“386. doi:10.1177/1094428106291059

`import math print("n1?")n1 = float(input())print("n2?")n2 = float(input())print("pre sd1?")sd1 = float(input())print("pre sd2?")sd2 = float(input())print("pre mean1?")pre1 = float(input())print("post mean1?")post1 = float(input())print("pre mean2?")pre2 = float(input())print("post mean2?")post2 = float(input()) def pooledSD(n1,n2,sd1,sd2):  return math.sqrt(((n1-1)*sd1**2 + (n2-1)*sd2**2)/(n1+n2-2)) def ppc(preMean1, preMean2, postMean1, postMean2, prePoolSD):  return ((postMean1 - preMean1) - (postMean2 - preMean2)) / prePoolSD print("Pooled pre SD")sd = pooledSD(n1,n2,sd1,sd2)print(sd) print("PPC ES")print(ppc(pre1, pre2, post1, post2, sd))`

You need to login to post a comment.