glm.test.control {snpStats} | R Documentation

## Set up control object for GLM computations

### Description

Several commands depend on fitting a generalized linear model (GLM), using the standard iteratively reweighted least squares (IRLS) algorithm. This function sets various control parameters for this.

### Usage

    glm.test.control(maxit = 20, epsilon = 1.e-5, R2Max = 0.99)

### 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 a generalized linear model (GLM). The `maxit` parameter sets the maximum number of iterations to be carried out, while the `epsilon` parameter sets the criterion for determining convergence. Variables which are judged to be "aliased" are dropped. A variable is judged to be aliased if RSS/TSS is less than (1-R2Max), where

- RSS is the residual (weighted) sum of squares from the regression of that variable on the variables which precede it in the model formula (and any stratification defined in a strata() call in th emodel formula), and

- TSS is the total (weighted) sum of squared deviations of this variable from its mean (or, when a strata() call is present, from its stratum-specific means).

The weights used in this calculation are the "working" weights of the IRLS algorithm.

### Value

Returns the parameters as a list in the expected order

### Author(s)

David Clayton dc208@cam.ac.uk

### See Also

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

[Package snpStats version 1.34.0 Index]