4

I have two questions regarding the R script.

If I want to know the size of the sampling when I do a t-test with R, I can use this R script :

power.t.test(delta=1,sd=1.5,sig.level=0.05,power=0.8)

If I want to know the size of the sampling when I do the test of Pearson correlation coefficient, what is the R script?

And for a chi-square test what is the R script?

Gala
  • 8,323
  • 2
  • 28
  • 42
varin sacha
  • 753
  • 2
  • 8
  • 18

1 Answers1

7

For correlation:

pwr.r.test(n = , r = , sig.level = , power = )

and for chi-square

pwr.chisq.test(w =, N = , df = , sig.level =, power = )

For others, see here

Metrics
  • 2,526
  • 2
  • 19
  • 31