Nothing
## sample size calculation for correlation coefficients (Pearson, kendall and SPearman)
## example: power.cor(rho=0.5, w=0.1, alpha=0.05, method="spearman")
`power.cor` <-
function (rho, w, alpha=0.05, method=c("pearson", "kendall", "spearman")) {
method <- match.arg(method)
bb <- c(3, 4, 3)
cc <- c(1, sqrt(0.437), sqrt(1 + (rho^2 / 2)))
names(bb) <- names(cc) <- c("pearson", "kendall", "spearman")
bb <- bb[method]
cc <- cc[method]
nn0 <- 4 * cc^2 * (1 - rho^2)^2 * (qnorm(p=alpha/2, lower.tail=FALSE) / w) + bb
if(nn0 < 10) { nn0t <- 10 } else { nn0t <- ceiling(nn0) }
w0w <- sqrt(nn0t - bb) / sqrt(nn0 - bb)
nn <- ceiling((nn0 - bb) * w0w^2 + bb)
return(nn)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.