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,...)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.