Learn R Programming

phenesse (version 0.1.3)

mean_ci: Calculating the confidence intervals (CIs) of an arithmetic mean.

Description

mean_ciFunction estimates CIs using nonparametric bootstrapping around a mean estimate.

Usage

mean_ci(observations, bootstraps = 1e+05, conf = 0.95, type = "perc")

Value

The estimated CIs around a mean estimate.

Arguments

observations

A vector of observations given as numeric values

bootstraps

The number of bootstraps you want to run to create the CIs, defaults to 100000

conf

The confidence level wanted. Defaults to 95% CI.

type

A vector of character strings representing the type of intervals required to calculate the CI. Defaults to "bca". See ??boot.ci for more information.

Functions

  • mean_ci: Estimates CIs around a mean percentile estimate using non-parametric bootstrapping from the boot package

Examples

Run this code
# Estimate when the mean observation of Rudbeckia hirta for the year 2019 up
# to October
data(inat_examples)
r_hirta <- subset(inat_examples, scientific_name == "Rudbeckia hirta")
mean_ci(observations = r_hirta$doy , bootstraps = 100)

# note low number of bootstraps for quick processing speed

Run the code above in your browser using DataLab