Learn R Programming

NSM3 (version 1.1)

cHollBivSym: Hollander Bivariate Symmetry

Description

Quantile function for the Hollander A distribution.

Usage

cHollBivSym(alpha,d.mat,method=NA, n.mc=10000)

Arguments

Value

Returns a list with "NSM3Ch5c" class containing the following components:mnumber of observations in the first data group (X)nnumber of observations in the second data group (Y) (equal to m, but included for standardization with other procedures)cutoff.Uupper tail cutoff at or below user-specified alphatrue.alpha.Utrue alpha level corresponding to cutoff.U

Details

The d matrix, d.mat, will be an n*n matrix of ones and zeroes, where the (i,j)th element is 1 if min(Xj,Yj)

References

Kepner, James L., and Ronald H. Randies. "Comparison of tests for bivariate symmetry versus location and/or scale alternatives." Communications in Statistics-Theory and Methods 13.8 (1984): 915-930. Hilton, Joan F., and Lauren Gee. "The size and power of the exact bivariate symmetry test." Computational statistics & data analysis 26.1 (1997): 53-69.

Examples

Run this code
##Hollander-Wolfe-Chicken Example 3.11 Insulin Clearance in Kidney Transplants
x<-c(61.4,63.3,63.7,80,77.3,84,105)
y<-c(70.8,89.2,65.8,67.1,87.3,85.1,88.1)
obs.data<-cbind(x,y)
a.vec<-apply(obs.data,1,min)
b.vec<-apply(obs.data,1,max)
test<-function(r,c) {as.numeric((a.vec[c]<b.vec[r])&&(b.vec[r]<=b.vec[c])&&(a.vec[r]<=a.vec[c]))}
myVecFun <- Vectorize(test,vectorize.args = c('r','c')) 

d.mat<-outer(1:length(x), 1:length(x), FUN=myVecFun) 

##Cutoff based on the exact distribution
cHollBivSym(.10,d.mat)

Run the code above in your browser using DataLab