#ci_converter.R
# John Henry wrote this
CI_converter <- function(upper, lower, n, interval = 95) {
# https://handbook-5-1.cochrane.org/chapter_7/7_7_3_2_obtaining_standard_deviations_from_standard_errors_and.htm
if (interval == 95){
sd <- (sqrt(n) * (upper - lower)) / 3.92
print(sd)
return( (sqrt(n) * (upper - lower)) / 3.92)
}
else if(interval == 90){
sd <- (sqrt(n) * (upper -lower)) / 3.29
print(sd)
return(sd)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.