We want to convert confidence intervals and Z-values.

Functions were developed from ideas presented on stack-exchange.

knitr::opts_chunk$set(echo = TRUE, warning=FALSE, comment=NA)

First, let's convert a series confidence levels to Z values

library(rAnaLab)

conf.levs <- c(0.500, 0.750, 0.800, 0.900, 0.950, 
               0.975, 0.990, 0.995, 0.998, 0.999)

z.vals <- unlist(lapply(conf.levs, cl.to.z))
print(z.vals)

Next, let's check our work and convert our Z values to confidence levels.

c.ls <- unlist(lapply(z.vals, z.to.cl))
print(c.ls)


jrminter/rAnaLab documentation built on July 20, 2020, 4:09 a.m.