Description Usage Arguments Details Value Objects from the Class Extends Slots Methods and Functions Note Author(s) See Also Examples
The FABinTestResults
object contains the results from a
simple binomial to test whether the number of affected in a trait are
higher than expected by chance. For more details on the method please
see binomialTest
.
1 2 3 4 5 |
(in alphabetic order)
method |
The multiple hypothesis testing method. All methods supported by
|
object |
The |
value |
For |
A call to the setter methods trait<-
resets any test
results present in the result
slot, thus, the object can be
re-used to perform a simulation analysis using the new trait data.
Refer to the method and function description above for detailed information on the returned result object.
FABinTestResults
objects are returned by the
binomialTest
function.
Class FAData
directly.
The results data.frame
.
Returns the result from the test as a data.frame
with
columns:
"trait_name"
: the name of the trait.
"total_phenotyped"
: total number of phenotyped individuals in
the trait.
"total_affected"
: total number of affected individuals in the
trait.
"family"
: the family id. If a global test is used (i.e. if
the pedigree consists of a single family, or global = TRUE
was provided, the column shows "full pedigree"
).
phenotyped
: the number of phenotyped individuals in the
family.
affected
: the number of affected individuals in the family.
pvalue
: the p-value from the binomial test (conducted using
the binom.test
function).
prob
: the probability of being affected. Either a
local probability calculated based on all affected and
phenotyped individuals in the whole pedigree, or a global
(population) probability that has to be provided with argument
prob
.
padj
: the p-value adjusted for multiple hypothesis testing
using the method defined with argument "method"
.
Set the trait information. This method will reset all simulation
results saved in the sim
slot.
Subsetting (using the [
operator) is not supported.
Johannes Rainer, Christian Weichenberger
FAData
,
kinship
,
trait
,
probabilityTest
,
kinshipGroupTest
,
kinshipSumTest
,
genealogicalIndexTest
,
familialIncidenceRateTest
,
fsirTest
,
plotPed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ##########################
##
## Perform the analysis
##
## Load the test data.
data(minnbreast)
## Subset to some families and generate a pedigree data.frame.
mbsub <- minnbreast[minnbreast$famid == 4 | minnbreast$famid == 5 |
minnbreast$famid == 6 | minnbreast$famid == 7 |
minnbreast$famid == 8, ]
PedDf <- mbsub[, c("famid", "id", "fatherid", "motherid", "sex")]
colnames(PedDf) <- c("family", "id", "father", "mother", "sex")
## Generate the FAData.
fad <- FAData(pedigree=PedDf)
## Specify the trait.
tcancer <- mbsub$cancer
names(tcancer) <- mbsub$id
## Perform the test:
bir <- binomialTest(fad, trait=tcancer, traitName="cancer")
result(bir)
## Calculating the probability of being affected from the whole data set.
prob <- sum(minnbreast$cancer, na.rm = TRUE) / sum(!is.na(minnbreast$cancer))
bir <- binomialTest(fad, trait = tcancer, prob = prob)
result(bir)
## Plot the pedigree of the family with the smallest p-value.
plotPed(bir, family = "8")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.