Description Usage Arguments Details Value Author(s) See Also
To carry out a score test for a GLM, we first fit a "base" model using the standard iteratively reweighted least squares (IRLS) algorithm and then carry out a score test for addition of further terms. This function sets various control parameters for this.
1 | glm.test.control(maxit, epsilon, R2Max)
|
maxit |
Maximum number of IRLS steps |
epsilon |
Convergence threshold for IRLS algorithm |
R2Max |
R-squared limit for aliasing of new terms |
Sometimes (although not always), an iterative scheme is necessary to fit
the "base" generalized linear model (GLM) before carrying out a score
test for effect of adding new term(s). The maxit
parameter sets
the maximum number of iterations to be carried out, while the
epsilon
parameter sets the criterion for determining
convergence. After fitting the base model, the new terms are added, but
terms judged to be "aliased" are omitted. The method for determining
aliasing is as follows (denoting the "design" matrix for the additional
terms by Z
):
Step 1Regress each column of Z
on the base model matrix,
using the final GLM weights from the base model fit, and replace
Z
with the residuals from these regressions.
Step 2Consider each column of the new Z
matrix in turn,
regressing it on the previous columns (again using the weights
from the base model fit). If the proportion of the weighted sum of
squares "explained" by this regression exceeds R2Max
, the term
is dropped and not included in the test,
The aim of this procedure to avoid wasting degrees of freedom on columns so strongly aliased that there is little power to detect their effect.
Returns the parameters as a list in the expected order
David Clayton david.clayton@cimr.cam.ac.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.