chi.squared(x, df)
deg.freedom(x)
effect.sign(x, simplify)
p.value(x, df)
sample.size(x)
effective.sample.size(x)
"SingleSnpTests"
,
"SingleSnpTestsScore"
, or "GlmTests"
x
is
of class "GlmTests"
)x
is of class
"GlmTests"
and plays the same role as it does in
sapply
. If simplify=TRUE
, where possible
the output is returned as a simple numeric vector rather than as a
listnames
attribute.
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.
single.snp.tests
,
snp.lhs.tests
, snp.rhs.tests
,
SingleSnpTests-class
,
SingleSnpTestsScore-class
,
GlmTests-class
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)
Run the code above in your browser using DataLab