Object Reference : Object View and Procedure Reference : Series
  
 
testby
Test equality of the mean, median, or variance of a series across categories defined by the row values of series or groups.
Syntax
series_name.testby(options) arg1 [arg2 arg2 …]
Follow the testby keyword by a list of the names of series or groups to use as classifiers.
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
wage.testby(a=10) state
tests equality of means of WAGE across groups classified by state, with binning of the average cell cound is less than 10.
wage.testby(med, nov) stores
tests equality of medians of WAGE across groups classified by STORES, with no automatic binning on the basis of the number of unique STORES values.
Cross-references
See “Equality Tests by Classification” for a discussion of equality tests.
See also Group::testbtw and Series::teststat.