Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xgx_conf_int

xgx_conf_int returns a dataframe with mean +/- confidence intervals


Description

xgx_conf_int returns a dataframe with mean +/- confidence intervals

Usage

xgx_conf_int(y, conf_level = 0.95, distribution = "normal")

Arguments

y

data to compute confidence interval of

conf_level

The percentile for the confidence interval (should fall between 0 and 1). The default is 0.95, which corresponds to a 95 percent confidence interval.

distribution

The distribution which the data follow, used for calculating confidence intervals. The options are "normal", "lognormal", and "binomial". The "normal" option will use the Student t Distribution to calculate confidence intervals, the "lognormal" option will transform data to the log space first. The "binomial" option will use the binom.exact function to calculate the confidence intervals. Note: binomial data must be numeric and contain only 1's and 0's.

Value

data.frame

Examples

# default settings for normally distributed data, 95% confidence interval,  
data <- data.frame(x = rep(c(1, 2, 3), each = 20),
                   y = rep(c(1, 2, 3), each = 20) + stats::rnorm(60),
                   group = rep(1:3, 20))
xgx_conf_int(data$y)

xgxr

Exploratory Graphics for Pharmacometrics

v1.1.1
MIT + file LICENSE
Authors
Andrew Stein [aut, cre], Alison Margolskee [aut], Fariba Khanshan [aut], Konstantin Krismer [aut] (<https://orcid.org/0000-0001-8994-3416>), Matthew Fidler [ctb] (<https://orcid.org/0000-0001-8538-6691>), Novartis Pharma AG [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.