R/D.akp.effect.R

D.akp.effect <-
function(x,y=NULL,null.value=0,tr=.2){
#
# Computes the robust effect size for one-sample case using
# a simple modification of
# Algina, Keselman, Penfield Pcyh Methods, 2005, 317-328
#
#  When comparing two dependent groups, data for the second group can be stored in
#  the second argument y. The function then computes the difference scores x-y
#
library(MASS)
if(!is.null(y))x=x-y
x<-elimna(x)
s1sq=winvar(x,tr=tr)
cterm=1
if(tr>0)cterm=area(dnormvar,qnorm(tr),qnorm(1-tr))+2*(qnorm(tr)^2)*tr
cterm=sqrt(cterm)
dval<-cterm*(tmean(x)-null.value)/sqrt(s1sq)
dval
}
musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.