ds_eqp_1: Non-parametric one-sample hypothesis testing via dynamic...

Description Usage Arguments Value See Also Examples

View source: R/RcppExports.R

Description

Non-parametric one-sample hypothesis testing via dynamic slicing with O(n)-resolution. The basic idea of ds_eqp_1 is almost the same as ds_1. Difference between these two functions is that ds_eqp_1 considers an equal partition on [0, 1] but ds_1 does not. Candidate slicing boundaries in ds_eqp_1 only depend on the total number of samples and are unrelated to sample quantiles. In ds_1 they are immediately to the left or right of sample quantile.

Usage

1
  ds_eqp_1(y, lambda)

Arguments

y

Vector: quantiles of observations according to null distribution.

lambda

lambda penalizes the number of slices to avoid too many slices. Since the interval [0, 1] is divided into n equal size element-slice and slicing strategy only consider boundaries of them, this version of dynamic slicing does not require penlaty lambda as ds_1. lambda should be greater than 0.

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_1.

Examples

1
2
3
4
5
6
n <- 100
mu <- 0.5
x <- rnorm(n, mu, 1)
y <- pnorm(sort(x), 0, 1) 
lambda <- 1.0
dsres <- ds_eqp_1(y, lambda)

dslice documentation built on May 2, 2019, 9:39 a.m.