lengthtest: Test for uniform distribution width.

Description Usage Arguments Value Examples

Description

Function lengthtest() tests the hypothesized uniform domain width against two-sided or one-sided alternatives from data contaminated with additive error. The additive error can be chosen as Laplace, Gauss or scaled Student distribution with 1 - 5 degrees of freedom.

Usage

1
2
3
lengthtest(x, error = c("laplace", "gauss", "t1", "t2", "t3", "t4",
  "t5"), alternative = c("two.sided", "greater", "less"), sd = NULL,
  null.a = NULL, sd.est = c("MM", "ML"), conf.level = 0.95)

Arguments

x

Vector of input data

error

A character string specifying the error distribution. Must be one of "laplace", "gauss", "t1", "t2", "t3", "t4", "t5". Can be abbreviated.

alternative

A character string specifying the alternative hypothesis, must be one of "two.sided", "greater" or "less". Can be abbreviated.

sd

Explicit error standard deviation. Needs to be given if var.sd is not given.

null.a

Specified null value being tested.

sd.est

A character string specifying the method of error standard deviation estimation. Must be given if sd is not given. Can be "MM" (Method of Moments) or "ML" (Maximum Likelihood).

conf.level

Confidence level of the confidence interval.

Value

List containing:

Examples

1
2
3
4
5
6
# generate uniform data with additive error and run a hypothesis testing on it
sample_1 <- runif(1000, -1, 1)
sample_2 <- rnorm(1000, 0, 0.1)
sample <- sample_1 + sample_2
out <- lengthtest(x = sample, error = "gauss", alternative = "greater",
                  sd.est = "MM", null.a = 0.997, conf.level = 0.95)

LeArEst documentation built on May 2, 2019, 7:55 a.m.

Related to lengthtest in LeArEst...