View source: R/utils-helpers.R
| ci_t | R Documentation |
Computes a t-distribution confidence interval for a sample mean.
ci_t(x, conf_level = 0.95)
x |
Numeric vector of observations |
conf_level |
Confidence level |
Used by the quantile-binned summary layer (see
er_plot_add_quantiles()) and er_vpc_add_observed()/
er_vpc_add_simulated() to compute a confidence interval for the mean
response within an exposure bin, for continuous (and, as an
approximation, count) responses. This is the continuous-response
analogue of ci_clopper_pearson(). NAs in x are dropped before
computing the interval.
Named numeric vector (lower, upper), with confidence level
stored as an attribute. Returns c(lower = NA, upper = NA) if fewer
than 2 non-missing values are supplied.
ci_t(rnorm(20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.