One Sample 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 .7540.

R

pwr::pwr.t.test(n=30,d=.5,sig.level=.05,type="one.sample")
## 
##      One-sample t test power calculation 
## 
##               n = 30
##               d = 0.5
##       sig.level = 0.05
##           power = 0.7539647
##     alternative = two.sided

after rounding we get power equal to .7539

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 68. ## R

pwr::pwr.t.test(d=.4,power=.9,sig.level=.05,type="one.sample")
## 
##      One-sample t test power calculation 
## 
##               n = 67.62138
##               d = 0.4
##       sig.level = 0.05
##           power = 0.9
##     alternative = two.sided

after rounding we get N=68

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,type="one.sample")
## 
##      One-sample t test power calculation 
## 
##               n = 52
##               d = 0.6052395
##       sig.level = 0.01
##           power = 0.95
##     alternative = two.sided

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",type="one.sample")
## 
##      One-sample t test power calculation 
## 
##               n = 54.90553
##               d = 0.4
##       sig.level = 0.05
##           power = 0.9
##     alternative = greater

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