Pairted 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 = 30
  • Alpha = .05
  • Tails: Two

PAMLj

The expected power is .7540.

R

pwr::pwr.t.test(n=30,d=.5,sig.level=.05,type="paired")
## 
##      Paired t test power calculation 
## 
##               n = 30
##               d = 0.5
##       sig.level = 0.05
##           power = 0.7539647
##     alternative = two.sided
## 
## NOTE: n is number of *pairs*

rounding at for decimal places, we obtain the same results.

G*Power

rounding at for decimal places, we obtain the same results.

Example 2: Sample size

Setup

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

PAMLj

The expected N is 68.

R

pwr::pwr.t.test(d=.4,power=.9,sig.level=.05,type="paired")
## 
##      Paired t test power calculation 
## 
##               n = 67.62138
##               d = 0.4
##       sig.level = 0.05
##           power = 0.9
##     alternative = two.sided
## 
## NOTE: n is number of *pairs*

after rounding, we get N=68.

G*Power

Results are the same.

Example 3: Effect size

Setup

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

PAMLj

R

pwr::pwr.t.test(n=52,power=.95,sig.level=.01, type="paired")
## 
##      Paired t test power calculation 
## 
##               n = 52
##               d = 0.6052395
##       sig.level = 0.01
##           power = 0.95
##     alternative = two.sided
## 
## NOTE: n is number of *pairs*

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,type="paired",alternative="greater")
## 
##      Paired t test power calculation 
## 
##               n = 54.90553
##               d = 0.4
##       sig.level = 0.05
##           power = 0.9
##     alternative = greater
## 
## NOTE: n is number of *pairs*

after rounding, we get N=55

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