powered by
Post-hoc power analysis using two-sample or paired t-test
sm_power(group1, group2, paired, sig.level = 0.05, power = 0.8)
Returns a result with a class of "power.htest" from the pwr package.
Numeric vector containing data from one sample (i.e., group 1) that is to be compared with another group.
Numeric vector containing data from another sample (i.e., group 2) that is to be compared with the former group.
A logical indicating whether your two samples (group1 and group2) are paired.
Significance level (Type I error probability). Default is set to 0.05.
Power of test (1 minus Type II error probability). Default is set to 0.8.
library(smplot2) group1 <- rnorm(10,0,1) group2 <- rnorm(10,1,1) sm_power(group1, group2, paired = TRUE)
Run the code above in your browser using DataLab