Learn R Programming

rhoR (version 1.3.1)

getTestSet: Get Test Set

Description

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

Usage

getTestSet(set, testSetLength, testSetBaserateInflation = 0)

Value

A codeSet with the properties specified

Arguments

set

The codeSet from which the testSet is taken

testSetLength

The length of the testSet to be taken

testSetBaserateInflation

The minimum guaranteed baserate of the testSet. Default to 0

Details

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.