This function gets a testSet from a larger codeSet given certain sampling parameters.

getTestSet(set, testSetLength, testSetBaserateInflation = 0)



The codeSet from which the testSet is taken


The length of the testSet to be taken


The minimum guaranteed baserate of the testSet. Default to 0


A codeSet with the properties specified


A testSet is a codeSet that is a subset of a larger codeSet with a given set of properties. A testSet is constructed by sampling (without replacement) P rows from rows in the larger codeSet where the first rater's code was 1, and then appending an additional sample (without replacement) of R rows taken at random from the larger codeSet excluding rows included in the first P rows sampled. P is computed as the minbaserate * length of the testset. R is computed as testSetLength - P. The result of this sampling procedure is to create a sample with a minimum baserate regardless of the baserate of the larger codeSet.If testSetBaserateInflation is set to zero, the function selects rows at random.