With simple pooling and halving, a typical predictor
has the form groupresp ~ covariates where groupresp
is the (numeric) group response vector. With array testing,
individual samples are placed in a matrix-like grid where
samples are pooled within each row and within each column.
This leads to two kinds of group responses: row and column
group responses. Thus, a typical predictor has the form
cbind(col.resp, row.resp) ~ covariates, where
col.resp is the (numeric) column group response vector
and row.resp is the (numeric) row group response vector.
For all methods, covariates is a series of terms which
specifies a linear predictor for individual responses.
Note that it is actually the unobserved individual responses,
not the observed group responses, which are modeled by the
covariates. When denoting group responses (groupresp,
col.resp, and row.resp), a 0 denotes a negative
response and a 1 denotes a positive response, where the
probability of an individual positive response is being
modeled directly.
A terms specification of the form
first + second indicates all the terms in first
together with all the terms in second with duplicates
removed. A specification of the form first:second
indicates the set of terms obtained by taking the interactions
of all terms in first with all terms in second.
The specification first*second indicates the cross of
first and second. This is the same as first +
second + first:second. The terms in the formula will be
re-ordered so that main effects come first, followed by the
interactions, all second-order, all third-order, and so on;
to avoid this, pass a terms object as the formula.
For simple pooling (type = "sp"), the functions gtreg.fit,
EM, and EM.ret, where the first corresponds to Vansteelandt's
method described in Vansteelandt et al. (2000) and the last two correspond
to Xie's method described in Xie (2001), are called to carry out the
model fitting. The gtreg.fit function uses the optim
function with default method "Nelder-Mead" to maximize
the likelihood function of the observed group responses.
If this optimization method produces a Hessian matrix of all
zero elements, the "SANN" method in optim is
employed to find the coefficients and Hessian matrix. For
the "SANN" method, the number of iterations in optim
is set to be 10000. For the background on the use of optim,
see help(optim).
The EM and EM.ret functions apply Xie's EM
algorithm to the likelihood function written in terms of the
unobserved individual responses; the functions use glm.fit
to update the parameter estimates within each M step. The
EM function is used when there are no retests and
EM.ret is used when individual retests are available.
Thus, within the retest argument, individual observations
in observed positive groups are 0 (negative) or 1 (positive);
the remaining individual observations are NAs, meaning
that no retest is performed for them. Retests cannot be used
with Vansteelandt's method; a warning message will be given
in this case, and the individual retests will be ignored in
the model fitting. There could be slight differences in the
estimates between Vansteelandt's and Xie's methods (when
retests are not available) due to different convergence criteria.
With simple pooling (i.e., Dorfman testing, two-stage hierarchical
testing), each individual appears in exactly one pool. When only the
group responses are observed, the null degrees of freedom are the number
of groups minus 1 and the residual degrees of freedom are the number of
groups minus the number of parameters. When individual retests are
observed too, it is an open research question for what the degrees of
freedom and the deviance for the null model should be; therefore, the
degrees of freedom and null.deviance will not be displayed.
Under the halving protocol, the EM.halving function
applies Xie's EM algorithm to the
likelihood function written in terms of the unobserved
individual responses; the functions use glm.fit to update
the parameter estimates within each M step. In the halving
protocol, if the initial group tests positive, it is split
into two subgroups. The two subgroups are subsequently tested
and if either subgroup tests positive, the third and final
step is to test all individuals within the subgroup. Thus,
within subg, subgroup responses in observed positive
groups are 0 (negative) or 1 (positive); the remaining
subgroup responses are NAs, meaning that no tests are
performed for them. The individual retests are similarly coded.
With array testing (also known as matrix pooling), the
EM.mp function applies Xie's
EM algorithm to the likelihood function written in terms of the
unobserved individual responses. In each E step, the Gibbs
sampling technique is used to estimate the conditional
probabilities. Because of the large number of Gibbs samples
needed to achieve convergence, the model fitting process could
be quite slow, especially when multiple positive rows and
columns are observed. In this case, we can either increase the
Gibbs sample size to help achieve convergence or loosen the
convergence criteria by increasing tol at the expense
of perhaps poorer estimates. If follow-up retests are performed,
the retest results going into the model will help achieve
convergence faster with the same Gibbs sample size and
convergence criteria. In each M step, we use glm.fit to
update the parameter estimates.
For simple pooling, retest provides individual retest
results for Dorfman's retesting procedure. Under the halving
protocol, retest provides individual retest results
within a subgroup that tests positive. The retest
argument provides individual retest results, where a 0
denotes negative and 1 denotes positive status. A NA
denotes that no retest is performed for that individual.
The default value is NULL for no retests.
For simple pooling, control provides parameters for
controlling the fitting process in the "Xie" method only.
gtReg returns an object of class "gtReg".
The function summary (i.e., summary.gtReg
is used to obtain or print a summary of the results.
The group testing function predict (i.e.,
predict.gtReg
) is used to make predictions
on "gtReg" objects.