silverman.test: Silvermantest

Description Usage Arguments Value Examples

View source: R/silverman.test.R

Description

The silvermantest tests the null hypothesis that an underlying density has at most k modes.

Usage

1
2
silverman.test(x, k, R = 999, adjust = FALSE, digits = 6,
  density.fun = NULL)

Arguments

x

vector of data

k

number of modes for the null hypothesis

R

number of bootstrap replications

adjust

boolean to activate the adjusting of the p-value (valid if k=1) (see Hall and York)

digits

number of digits of the p-value

density.fun

A function that returns a vector of density estimates

Value

An object of the class Silvermantest (see: Silvermantest-class).

Examples

1
2
x <- c(rpois(n = 50, lambda = 1), rnorm(n = 100, mean = 4))
silverman.test(x, k = 1)

jenzopr/silvermantest documentation built on Nov. 4, 2019, 2:39 p.m.