Learn R Programming

binGroup2 (version 1.1.0)

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

Description

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

Usage

designEst(n, smax, p.tr, biasrest = 0.05)

Arguments

n

integer specifying the fixed number of groups.

smax

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

p.tr

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

biasrest

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

Value

A list containing:

sout

the group size s for which the MSE of the estimator is minimal for the given n and p.tr 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.

varp

the variance of the estimator.

mse

the mean square error of the estimator.

bias

the bias of the estimator.

exp

the expected value of the estimator.

Details

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

References

Swallow1985binGroup2

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()

Examples

Run this code
# NOT RUN {
# Compare to Table 1 in Swallow (1985):
designEst(n = 10, smax = 100, p.tr = 0.001)
designEst(n = 10, smax = 100, p.tr = 0.01)
designEst(n = 25, smax = 100, p.tr = 0.05)
designEst(n = 40, smax = 100, p.tr = 0.25)
designEst(n = 200, smax = 100, p.tr = 0.30)
# }

Run the code above in your browser using DataLab