R/designFunctions.R
designEst.Rd
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.
designEst(n, smax, p.tr, 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.
A list containing:
the function call
a data frame containing:
the mean squared error of the estimator.
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.
the expected value of the estimator.
the variance of the estimator.
the bias of the estimator.
a logical value indicating whether the bias restriction biasrest was violated.
a logical value indicating whether the maximum group size allowed smax was reached.
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\).
Swallow, W. (1985). “Group testing for estimating infection rates and probabilities of disease transmission.” Phytopathology, 75, 882–889.
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, p.tr = 0.001)
#>
#> The minimum MSE of 1.202e-06 is achieved with a group size of s >= 100
#> The estimator has expected value = 0.001056 and variance = 1.199e-06,
#> with bias = 5.633e-05
#>
designEst(n = 10, smax = 100, p.tr = 0.01)
#>
#> The minimum MSE of 4.58e-05 is achieved with a group size of 33
#> The estimator has expected value = 0.01064 and variance = 4.539e-05,
#> with bias = 0.0006418
#>
designEst(n = 25, smax = 100, p.tr = 0.05)
#>
#> The minimum MSE of 0.0001998 is achieved with a group size of 18
#> The estimator has expected value = 0.05165 and variance = 0.0001971,
#> with bias = 0.001647
#>
designEst(n = 40, smax = 100, p.tr = 0.25)
#>
#> The minimum MSE of 0.002056 is achieved with a group size of 4
#> The estimator has expected value = 0.254 and variance = 0.00204,
#> with bias = 0.004003
#>
designEst(n = 200, smax = 100, p.tr = 0.30)
#>
#> The minimum MSE of 0.0004943 is achieved with a group size of 4
#> The estimator has expected value = 0.3011 and variance = 0.0004932,
#> with bias = 0.001052
#>