# NOT RUN {
# create or import dataset
example.data <- matrix(rnorm(50), 25, 2)
# estimate statistical power
EstimatePower(
data = example.data,
n.original = 10,
analysis = function(data) {
corr <- cor.test(data[,1], data[,2])
return(list(effect.size = corr$estimate, p.value = corr$p.value))
},
B.power = 100,
n.rows = 1,
alpha = 0.05)
# }
Run the code above in your browser using DataLab