designEst {binGroup2}R Documentation

Optimal group size determination based on minimal MSE when estimating an overall prevalence


Find the group size s for a fixed number of groups n and an assumed true proportion, for which the mean squared error (MSE) of the point estimator is minimal and bias is within a restriction.


designEst(n, smax,, biasrest = 0.05)



integer specifying the fixed number of groups.


integer specifying the maximum group size allowed in the planning of the design.

assumed true proportion of the "positive" trait in the population, specified as a value between 0 and 1.


a value between 0 and 1 specifying the absolute bias maximally allowed.


Swallow (1985) recommends the use of the upper bound of the expected range of the true proportion for optimization of the design. For further details, see Swallow (1985). Note that the specified number of groups must be less than n=1020.


A list containing:


the group size s for which the MSE of the estimator is minimal for the given n and and for which the bias restriction biasrest is not violated. In the case that the minimum MSE is achieved for a group size s>=smax, the value of smax is returned.


the variance of the estimator.


the mean square error of the estimator.


the bias of the estimator.


the expected value of the estimator.


This function was originally written by Frank Schaarschmidt as the estDesign function for the binGroup package.


Swallow, W. (1985). “Group testing for estimating infection rates and probabilities of disease transmission.” Phytopathology, 75, 882–889. doi: 10.1094/Phyto-75-882,

See Also

designPower for choice of the group testing design according to the power in a hypothesis test.

Other estimation functions: designPower(), gtPower(), gtTest(), gtWidth(), propCI(), propDiffCI()


# Compare to Table 1 in Swallow (1985):
designEst(n = 10, smax = 100, = 0.001)
designEst(n = 10, smax = 100, = 0.01)
designEst(n = 25, smax = 100, = 0.05)
designEst(n = 40, smax = 100, = 0.25)
designEst(n = 200, smax = 100, = 0.30)

[Package binGroup2 version 1.1.0 Index]