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