oneSampleDominance: Dominance statistic for one-sample data

View source: R/oneSampleDominance.r

oneSampleDominanceR Documentation

Dominance statistic for one-sample data

Description

Calculates a dominance effect size statistic compared with a theoretical median for one-sample data with confidence intervals by bootstrap

Usage

oneSampleDominance(
  x,
  mu = 0,
  ci = FALSE,
  conf = 0.95,
  type = "perc",
  R = 1000,
  histogram = FALSE,
  digits = 3,
  na.rm = TRUE,
  ...
)

Arguments

x

A vector of numeric values.

mu

The median against which to compare the values.

ci

If TRUE, returns confidence intervals by bootstrap. May be slow.

conf

The level for the confidence interval.

type

The type of confidence interval to use. Can be any of "norm", "basic", "perc", or "bca". Passed to boot.ci.

R

The number of replications to use for bootstrap.

histogram

If TRUE, produces a histogram of bootstrapped values.

digits

The number of significant digits in the output.

na.rm

If TRUE, removes NA values from the input vector x.

...

Additional arguments.

Details

The calculated Dominance statistic is simply the proportion of observations greater than mu minus the the proportion of observations less than mu.

It will range from -1 to 1, with 0 indicating that the median is equal to mu, and 1 indicating that the observations are all greater in value than mu, and -1 indicating that the observations are all less in value than mu.

This statistic is appropriate for truly ordinal data, and could be considered an effect size statistic for a one-sample sign test.

Ordered category data need to re-coded as numeric, e.g. as with as.numeric(Ordinal.variable).

When the statistic is close to 1 or close to -1, or with small sample size, the confidence intervals determined by this method may not be reliable, or the procedure may fail.

VDA is the analogous statistic, converted to a probability, ranging from 0 to 1, specifically, VDA = Dominance / 2 + 0.5.

Value

A small data frame consisting of descriptive statistics, the dominance statistic, and potentially the lower and upper confidence limits.

Author(s)

Salvatore Mangiafico, mangiafico@njaes.rutgers.edu

References

https://rcompanion.org/handbook/F_03.html

See Also

pairedSampleDominance, cliffDelta, vda

Examples

data(Catbus)
library(DescTools)
SignTest(Catbus$Rating, mu=5.5)
oneSampleDominance(Catbus$Rating, mu=5.5)


rcompanion documentation built on May 29, 2024, 8:42 a.m.