# NOT RUN {
data(screen8)
boys <- subset(screen8, gender=='M')
girls <- subset(screen8, gender=='F')
## Do boys and girls have the same variability in math scores?
## Test using vectors
vartestClust(x=boys$math, y=girls$math, idx=boys$sch.id, idy=girls$sch.id)
## Test using formula method.
vartestClust(math~gender, id=sch.id, data=screen8)
## Note that in this example, the sign of the estimate returned when using the formula
## method is opposite to that when the test was performed using vectors. This is due to
## the order of the gender factor levels
# }
Run the code above in your browser using DataLab