Calculates the mean value and confidence interval, as well as standard deviation and standard error of the mean, for every column in an input table. Confidence intervals are calculated using the "Empirical bootstrap" technique (based on random sampling with replacement). The input will typically be a table of signal values for different obervations (across rows) over a set of positions (across columns).

signal_mean_and_ci(signal_data, ci = 0.95, rep_bootstrap = 1000,
  na_rm = TRUE)

Arguments

signal_data

Input signal data matrix (or an object that can be coerced to class matrix). No default.

ci

Numeric value between 0 and 1 representing the confidence interval percentage. Defaults to 0.95.

rep_bootstrap

Integer specifying the number of times to repeat the bootstrapping procedure. Defaults to 1000.

na_rm

Logical indicating whether to remove NA values in each column before calculating the mean and bootstrapping. Defaults to TRUE.

Value

A matrix with as many rows as there are columns in the input and three columns:

  1. Mean Input column mean

  2. Lower Lower limit of the bootstrapping confidence interval

  3. Upper Upper limit of the bootstrapping confidence interval

  4. SD Standard deviation

  5. SEM Standard error of the mean

Examples

# NOT RUN {
signal_mean_and_ci(WT_signal_at_orf)

signal_mean_and_ci(WT_signal_at_summits, ci=0.90)

signal_mean_and_ci(WT_signal_at_dsb, bootstrap_reps=5000)
# }