Skip to contents

This function calculates the probabilities that one stimulus is greater than another based on MCMC or resampled values. It can handle input data in the form of a matrix, data frame, or mcmc.list. The function computes pairwise comparisons between the specified stimuli.

Usage

diffStims(x, stims, digits = 3, ...)

Arguments

x

A matrix, data frame, or mcmc.list containing MCMC or resampled values. The rows represent different samples, and the columns represent different stimuli or variables.

stims

A vector of stimuli to compare. This can be a numeric vector of column indices or a character vector of column names.

digits

An integer specifying the number of decimal places to display in the output. Default is 3.

...

Additional arguments (currently unused).

Value

A data frame with two columns: Comparison, which contains the comparison labels (e.g., "Pr(stim2 > stim1)"), and Probability, which contains the probabilities formatted to the specified number of digits.

Examples

if (FALSE) { # \dontrun{
data(bam.france)
diffStims(bam.france$zhat, stims=c(3,4))
} # }