Description Usage Arguments Details Value Note Author(s) See Also Examples
Generic functions to extract values from the SNP association test objects returned by various testing functions
1 2 3 4 5 6 | chi.squared(x, df)
deg.freedom(x)
effect.sign(x, simplify)
p.value(x, df)
sample.size(x)
effective.sample.size(x)
|
x |
An object of class |
df |
Either the numeric value 1 or 2 (not used when |
simplify |
This switch is relevant when |
These functions operate on objects created by
single.snp.tests
, snp.lhs.tests
, and
snp.lhs.tests
.
The functions chi.squared
and p.value
return the
chi-squared statistic and the corresponding p-value.
The argument df
is only used for
output from single.snp.tests
, since this function calculates
both 1 df and 2 df tests for each SNP. The functions
snp.lhs.tests
and snp.rhs.tests
potentially calculate
chi-squared tests on varying degrees of freedom, which can be
extracted with deg.freedom
. The function effect.sign
indicates the direction of
associations. When applied to an output object from
snp.single.tests
, it returns +1
if the association, as
measured by the 1 df test, is positive and -1
if the
association is negative. Each test calculated by GlmTests
are potentially tests of several parameters so that the effect sign
can be a vector. Thus effect.sign
returns a list of sign
vectors unless, if simplify=TRUE
, and it can be simplified as a
single vector with one sign for each test.
The function sample.size
returns the number of observations
actually used in the test, after exclusions due to missing data have
been applied, and effective.sample.size
returns the effective
sample size which is less than the true sample size for tests on
imperfectly imputed SNPs.
A numeric vector containing the
chi-squared test statistics or p-values. The output vector has a names
attribute.
The df
and simplify
arguments are not always
required (or legal). See above
David Clayton dc208@cam.ac.uk
single.snp.tests
,
snp.lhs.tests
, snp.rhs.tests
,
SingleSnpTests-class
,
SingleSnpTestsScore-class
,
GlmTests-class
1 2 3 4 5 | data(testdata)
tests <- single.snp.tests(cc, stratum=region, data=subject.data,
snp.data=Autosomes, snp.subset=1:10)
chi.squared(tests, 1)
p.value(tests, 1)
|
Loading required package: survival
Loading required package: Matrix
173760 173761 173762 173767 173769 173770 173772
1.00000000 1.42532140 1.87283271 0.75765548 2.87726991 NA 1.08695652
173774 173775 173776
0.65081636 0.94559292 0.09630493
173760 173761 173762 173767 173769 173770 173772
0.31731051 0.23252951 0.17115100 0.38406323 0.08983822 NA 0.29714653
173774 173775 173776
0.41982096 0.33084363 0.75630975
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.