R/loc2plot.R

loc2plot <-
function(x,y,plotfun=akerd,xlab='X',ylab='',...){
#
# Plot an estimate of the distribution of X-Y
# By default, 
# plotfun=akerd, meaning that a kernel adaptive estimator is used.
# Other options are:
#  skerd
# kdplot 
# rdplot
#
#  See Wilcox Introduction to Robust Estimation and Hypothesis Testing
#  section 3.2 for details.
#
m=elimna(cbind(x,y))
x=m[,1]
y=m[,2]
temp=temp=as.vector(outer(x,y,FUN='-'))
plotfun(temp,xlab=xlab,ylab=ylab,...)
}
musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.