Object Reference : Object View and Procedure Reference : Vector
  
 
testby
Test equality of the mean, median, or variance of the data in a vector across categories defined by the row values of a vector or matrix.
Syntax
vector_name.testby(options) arg1 [arg2 arg2 …]
Follow the testby keyword by a list of the names of the vector or matrix whose rows contain the classifier values.
By default, testby will test for equality of means, but you may specify instead tests of medians or variances as an option, choose whether to use balanced or unbalanced samples, and control binning.
Options
 
mean (default)
Test equality of means.
med
Test equality of medians.
var
Test equality of variances.
dropna (default), keepna
[Drop /Keep] NAs as a classification category.
v=integer (default=1000)
Bin categories if classification series take more than the specified number of distinct values.
nov
Do not bin based on the number of values of the classification series.
a=number (default=2)
Bin categories if average cell count is less than the specified number.
noa
Do not bin on the basis of average cell count.
b=integer (default=5)
Set maximum number of binned categories.
nolimit
Remove prompt warning for continuing when the total number of cells is very large.
prompt
Force the dialog to appear from within a program.
p
Print the test results.
Examples
vec1.testby(a=10) vec2
tests equality of means of VEC1 across groups classified by values of the matching length vector VEC2, with binning of the average cell count is less than 10.
vec1.testby(med, nov) vec2
tests equality of medians of VEC1 across groups classified by VEC2, with no automatic binning on the basis of the number of unique VEC2 values.
Cross-references
See “Equality Tests by Classification” for a discussion of equality tests.
See also Series::testby.