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

Description Usage Arguments Value Author(s) References Examples

View source: R/LP.QDC.R

Description

This function runs the entire quantile and distribution comparison, giving LP comeans, LP Fourier 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 comeans and LP Fourier coefficients to be calculated, default: 6

smooth

If smoothing should be applied, default: TRUE

method

Smoothing method, 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 f1 dominates the pooled distribution

out.below

Quantile intervals where f0 dominates the pooled distribution

LP.comeans.0

LP comeans, conditioned on X=0

LP.coef.0

LP Fourier coefficients, conditioned on X=0

LP.comeans.1

LP comeans, conditioned on X=1

LP.coef.1

LP Fourier 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. and Mukhopadhyay, S. (2018), "Two-Sample Quantile and Distribution Comparisons"

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 Oct. 31, 2018, 1:05 a.m.