R/comdvar.R

comdvar <-
function(x,y,alpha=.05){
#
# Test the hypothesis that two dependent variables have equal variances.
# A heteroscedastic version of the Morgan-Pitman test is used.
# (The HC4 estimator is used to deal with heteroscedasticity)
#
xy=elimna(cbind(x,y))
est1=var(xy[,1])
est2=var(xy[,2])
pv=pcorhc4(xy[,1]-xy[,2],xy[,1]+xy[,2],alpha=alpha)
list(p.value=pv$p.value, est1=est1, est2=est2)
}
musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.