Score tests with SNP genotypes as dependent variable
Under the assumption of Hardy-Weinberg equilibrium, a SNP genotype is
a binomial variate with two trials for an autosomal SNP or with one or
two trials (depending on sex) for a SNP on the X chromosome.
With each SNP in an input
"SnpMatrix" as dependent variable, this function first fits a
"base" logistic regression model and then carries out a score test for
the addition of further term(s). The Hardy-Weinberg
assumption can be relaxed by use of a "robust" option.
1 2 3
The SNP data, as an object of class
An array describing the subset of observations to be considered
An array describing the subset of SNPs to be considered. Default action is to test all SNPs.
The data frame in which
An object giving parameters for the IRLS algorithm
fitting of the base model and for the acceptable aliasing amongst
new terms to be tested. See
Is extended score information to be returned?
The tests used are asymptotic chi-squared tests based on the vector of
first and second derivatives of the log-likelihood with respect to the
parameters of the additional model. The "robust" form is a generalized
score test in the sense discussed by Boos(1992).
data argument is supplied, the
data objects are aligned by rowname. Otherwise all variables in
the model formulae are assumed to be stored in the same order as the
columns of the
An object of class
depending on whether
score is set to
in the call.
A factor (or
several factors) may be included as arguments to the function
strata(...) in the
base.formula. This fits all
interactions of the factors so included, but leads to faster
computation than fitting these in the normal way. Additionally, a
cluster(...) call may be included in the base model
formula. This identifies clusters of potentially correlated
observations (e.g. for members of the same family); in this case, an
appropriate robust estimate of the variance of the score test is used.
No more than one
strata() call may be used, and neither
cluster(...) calls may appear in the
A known bug is that the function fails when no
data argument is
supplied and the base model formula contains no variables
~1). A work-round is to create a data frame to hold the
variables in the models and pass this as
David Clayton firstname.lastname@example.org
Boos, Dennis D. (1992) On generalized score tests. The American Statistician, 46:327-333.
1 2 3 4
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.