LP.QDC: The main function for two-sample quantile and distribution...

Description Usage Arguments Value Author(s) References Examples

Description

This function runs the entire quantile and distribution comparison, giving LP comoments, LP coefficients, LPINFOR test statistic, p-value, estimated comparison density with null-band, and intervals where the comparison density is above or below the null band

Usage

1
2
LP.QDC(x,y,m=6,smooth="TRUE",method="BIC",alpha=0.05,
       B=1000,spar=NA,plot="TRUE",inset=-0.2)

Arguments

x

Indicator variable denoting group membership

y

Response variable with measured values

m

Number of LP comoments and LP coefficients to be calculated, default: 6

smooth

If smoothing should be applied, default: TRUE

method

Smoothing method as AIC or BIC, default: BIC

alpha

Alpha-level for confidence bands, default: 0.05

B

Number of permutations of the x labels, default: 1000

spar

"spar" in "smooth.spline" of upper and lower bounds of confidence bands, default: NA, let smooth.splines function figure it out

plot

Should plotting be performed, default: TRUE

inset

Graphical parameter that controls where the color legend is plotted below x-axis, default: -0.2

Value

A list containing:

band

y-values of the upper and lower bounds of the confidence band

d.hat

y-values of the comparison density

sparL

"spar" value in "smooth.spline" of lower bound of the null band

sparU

"spar" value in "smooth.spline" of upper bound of the null band

out.above

Quantile intervals where group 1 dominates the pooled distribution

out.below

Quantile intervals where group 0 dominates the pooled distribution

LP.comoment.0

LP comoments, conditioned on X=0

LP.coef.0

LP coefficients, conditioned on X=0

LP.comoment.1

LP comoments, conditioned on X=1

LP.coef.1

LP coefficients, conditioned on X=1

LPINFOR

Test statistics value

pval

The p-value for testing equality of two distributions F0=F1

Author(s)

David Jungreis

Subhadeep Mukhopadhyay

References

Jungreis, D., (2019) "Unification of Continuous, Discrete, and Mixed Distribution Two-Sample Testing with Inferences in the Quantile Domain"

Mukhopadhyay, S. and Parzen, E. (2014), "LP Approach to Statistical Modeling", arXiv:1405.2601.

Examples

1
2
3
4
x <- c(rep(0,200),rep(1,200))
y <- c(rnorm(200,0,1),rnorm(200,1,1))
L <- LP.QDC(x,y)
L$pval

QDComparison documentation built on June 24, 2019, 9:04 a.m.