Independent Samples t-test

Validation

0.1.0

Here we compare the results of PAMLj with other software that performs power analysis. In particular, we will compare our results with R pwr package and G*Power.

Example 1 : Power

Setup

  • Aim = Power
  • Expected \(\delta\) = .5
  • N per group = 30
  • Alpha = .05
  • Tails: Two

PAMLj

The expected power is .4779.

R

pwr::pwr.t.test(n=30,d=.5,sig.level=.05)
## 
##      Two-sample t test power calculation 
## 
##               n = 30
##               d = 0.5
##       sig.level = 0.05
##           power = 0.4778965
##     alternative = two.sided
## 
## NOTE: n is number in *each* group

G*Power

Results are the same

Example 2: Sample size

Setup

  • Aim = N
  • Expected \(\delta\) = .4
  • Power = .90
  • Alpha = .05
  • Tails = Two

PAMLj

The expected N is 266, 113 per group. ## R

pwr::pwr.t.test(d=.4,power=.9,sig.level=.05)
## 
##      Two-sample t test power calculation 
## 
##               n = 132.3105
##               d = 0.4
##       sig.level = 0.05
##           power = 0.9
##     alternative = two.sided
## 
## NOTE: n is number in *each* group

G*Power

Results are the same.

Example 3: Effect size

Setup

  • Aim = minimal effect size
  • power = .95
  • N per group = 52
  • Alpha = .01

PAMLj

R

pwr::pwr.t.test(n=52,power=.95,sig.level=.01)
## 
##      Two-sample t test power calculation 
## 
##               n = 52
##               d = 0.8415181
##       sig.level = 0.01
##           power = 0.95
##     alternative = two.sided
## 
## NOTE: n is number in *each* group

G*Power

Again, rounding a the third decimal place, results are the same.

Example 4: One-tail

Setup

  • Aim = N
  • Expected \(\delta\) = .4
  • Power = .90
  • Alpha = .05
  • Tails = One

PAMLj

R

pwr::pwr.t.test(d=.4,power=.90,sig.level=.05,alternative="greater")
## 
##      Two-sample t test power calculation 
## 
##               n = 107.7313
##               d = 0.4
##       sig.level = 0.05
##           power = 0.9
##     alternative = greater
## 
## NOTE: n is number in *each* group

G*power

Return to main help pages

Main page PAMLj: rosetta T-test

Comments?

Got comments, issues or spotted a bug? Please open an issue on PAMLj at github or send me an email

References