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
LP.QDC(x,y,m=6,smooth="TRUE",method="BIC",alpha=0.05,
B=1000,spar=NA,plot="TRUE",inset=-0.2)
Indicator variable denoting group membership
Response variable with measured values
Number of LP comoments and LP coefficients to be calculated, default: 6
If smoothing should be applied, default: TRUE
Smoothing method as AIC or BIC, default: BIC
Alpha-level for confidence bands, default: 0.05
Number of permutations of the x labels, default: 1000
"spar" in "smooth.spline" of upper and lower bounds of confidence bands, default: NA, let smooth.splines function figure it out
Should plotting be performed, default: TRUE
Graphical parameter that controls where the color legend is plotted below x-axis, default: -0.2
A list containing:
y-values of the upper and lower bounds of the confidence band
y-values of the comparison density
"spar" value in "smooth.spline" of lower bound of the null band
"spar" value in "smooth.spline" of upper bound of the null band
Quantile intervals where group 1 dominates the pooled distribution
Quantile intervals where group 0 dominates the pooled distribution
LP comoments, conditioned on X=0
LP coefficients, conditioned on X=0
LP comoments, conditioned on X=1
LP coefficients, conditioned on X=1
Test statistics value
The p-value for testing equality of two distributions F0=F1
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.
# NOT RUN {
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
# }
Run the code above in your browser using DataLab