estimate_norm_dist_from_ci: A Function to Estimate a Normal Distribution from Credible or...

View source: R/estimate_norm_dist_from_ci.R

estimate_norm_dist_from_ciR Documentation

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

Description

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

Usage

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))

seabbs/idmodelr documentation built on Sept. 5, 2022, 11:32 a.m.