ds_1 {dslice}R Documentation

Non-parametric one-sample hypothesis testing via dynamic slicing

Description

Non-parametric one-sample hypothesis testing via dynamic slicing. By mapping sample values to the quantile of null distribution, ds_1 test whether they follow uniform distribution on [0, 1] via a regularized likelihood-ratio. Its calculated is based on a dynamic programming procedure.

Usage

  ds_1(y, lambda, alpha)

Arguments

y

Vector: quantiles of observations according to null distribution.

lambda

lambda penalizes the number of slices to avoid too many slices. lambda should be greater than 0.

alpha

alpha penalizes both the width and the number of slices to avoid too many slices and degenerate slice (interval). alpha should be greater than 1.

Value

Value of dynamic slicing statistic for one-sample test. It is nonnegative. The null hypothesis that observations are from the null distribution is rejected if this statistic is greater than zero, otherwise accept the null hypothesis.

See Also

ds_eqp_1.

Examples

n <- 100
mu <- 0.5
x <- rnorm(n, mu, 1)
y <- pnorm(sort(x), 0, 1) 
lambda <- 1.0
alpha <- 1.0
dsres <- ds_1(y, lambda, alpha)

[Package dslice version 1.2.2 Index]