A Function to Estimate a Normal Distribution from Credible or Confidence Intervals

estimate_norm_dist_from_ci(
  lower_interval = NULL,
  upper_interval = NULL,
  interval = "95%"
)

Arguments

lower_interval

Numeric, the lower CI.

upper_interval

Numeric, the upper CI

interval

A character string indicating the percentage interval the CI represents.

Value

A dataframe containing the mean and standard deviation of the normal distribution summarised by the provided CI's.

Examples

## Run function to estimate normal distribution for a 95% CI of 1, to 2 df <- estimate_norm_dist_from_ci(1,2) ## Check x <- rnorm(10000, df$mean, df$sd) quantile(x, c(0.025, 0.975))
#> 2.5% 97.5% #> 1.001343 1.992519