glm.test.control {snpMatrix} | R Documentation

## Set up control object for GLM tests

### Description

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.

### Usage

    glm.test.control(maxit, epsilon, R2Max)

### Arguments

`maxit` | Maximum number of IRLS steps
`epsilon` | Convergence threshold for IRLS algorithm
`R2Max` | R-squared limit for aliasing of new terms

### Details

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 1
  Regress 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 2
  Consider 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.

### Value

Returns the parameters as a list in the expected order

### Author(s)

David Clayton david.clayton@cimr.cam.ac.uk

### See Also

`snp.lhs.tests`, `snp.rhs.tests`

[Package snpMatrix version 1.4.2 Index]