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

Description Usage Arguments Value Functions Examples

View source: R/mean_ci.R

Description

mean_ciFunction estimates CIs using nonparametric bootstrapping around a mean estimate.

Usage

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

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.

Value

The estimated CIs around a mean estimate.

Functions

Examples

1
2
3
4
5
6
7
# 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

phenesse documentation built on July 29, 2020, 1:06 a.m.