nmad_test function

Normalized Absolute Deviation

Normalized Absolute Deviation

Calculates the Normalized Absolute Deviation between the empirical moments and the moments of the provided distribution. Corresponds to the Kolmogorov-Smirnov test statistic for the zeroth moment.

nmad_test( x, r = 0, dist, prior = 1, coeff, stat = c("NULL", "max", "sum"), ... )

Arguments

  • x: data vector
  • r: moment parameter
  • dist: character vector containing distribution
  • prior: named list of priors, defaults to 1
  • coeff: named list of coefficients
  • stat: character vector indicating which statistic should be calculated: none (NULL), the maximum deviation "max" or the sum of deviations "sum". Defaults to NULL.
  • ...: Additional arguments can be passed to the parametric moment call.

Examples

x <- rlnorm(1e2, meanlog = -0.5, sdlog = 0.5) nmad_test(x = x, r = 0, dist = "lnorm", coeff = c(meanlog = -0.5, sdlog = 0.5)) nmad_test(x = x, r = 0, dist = "lnorm", coeff = c(meanlog = -0.5, sdlog = 0.5), stat = "max") nmad_test(x = x, r = 0, dist = "lnorm", coeff = c(meanlog = -0.5, sdlog = 0.5), stat = "sum")
  • Maintainer: Ruben Dewitte
  • License: GPL-3
  • Last published: 2020-05-25

Useful links