ci2p compute the p-value related with a provided confidence interval. It considers a symmetric distribution (by default standard normal).

ci2p(
  est,
  lower,
  upper,
  log_transform = FALSE,
  conf = 0.95,
  qdist = stats::qnorm,
  pdist = stats::pnorm
)

Arguments

est

estimated value

lower

lower bound of the confidence level

upper

upper bound of the confidence level

log_transform

(default `FALSE`) flag indicating if a log transformation as to apply to the data

conf

(default `95%`) confidence level

qdist

(default `qnorm`) quantile function

pdist

(default `pnorm`) distribution function

Value

a p-value

Details

Confidence level can be customize (by default 95 possible to apply a log transformation in case of proportions.

Examples


ci2p(1.125, 0.634, 1.999, log_transform = TRUE)
#> [1] 0.367902
ci2p(1.257, 1.126, 1.403, log_transform = TRUE)
#> [1] 0.0003118063