aplot.statErr: Calculate mean/median and error of values in vector 'x'

Description Usage Arguments Value

Description

Calculate mean/median and error of values in vector x

Usage

1
2
3
aplot.statErr(x, fun = c("mean", "median"), err.fun = c("sd", "sem", "var",
  "ci"), ci = 0.95, num.bootstraps = 1, boot.err.mode = 1,
  groups = NULL, grand.stat = FALSE)

Arguments

x

Vector of numbers

fun

Statistic. Either mean or median. Default is mean

err.fun

Error/uncertainty to calculate. May be sd, sem, var, or ci. ci returns the quantiles of the input values unless you are bootstrapping in which case the confidence interval of the bootstrap distribution is returned.

ci

Confidence interval to report when using err.fun="ci"

num.bootstraps

Number of boostrap iterations. If num.bootstraps == 1 then no bootstrapping is performed.

boot.err.mode

Set to either 1, default or 2. Default behavior is to apply the error function, err.fun, to the bootstrap distribution. When set to 2 the error is bootstrapped and the mean of it's bootstrap distribution is returned.

groups

Grouping vector for values in x. If provided then this function operates on each group of values and returns a matrix of results.

grand.stat

If using groups this calculates the overall statistic and uncertainty by first calculating the group statistic and uncertainties then propagating that into the grand statistic.

Value

A vector of values or a matrix if groups was specified.


PfaffLab/aplot documentation built on May 31, 2019, 10:45 p.m.