print.colGxE {trio} | R Documentation |
Print
s the statistics computed with colGxE
. getGxEstats
generates a data frame
containing these statistics.
## S3 method for class 'colGxE' print(x, top = 5, digits = 4, onlyGxE = FALSE, ...) ## S3 method for class 'colGxEunstruct' print(x, top = 5, digits = 4, ...) getGxEstats(x, top = NA, sortBy = c("none", "gxe", "lrt2df", "wald2df", "lrt1df", "g"))
x |
an object of class |
top |
number of top interactions that should be printed or stored in a data frame. If |
onlyGxE |
logical indicating whether only the statistics for the parameter of the GxE interaction should be printed.
If |
digits |
number of digits that should be printed. |
... |
ignored. |
sortBy |
character string specifying by the p-value of which test the SNPs should be sorted. If |
Holger Schwender, holger.schwender@udo.edu
Schwender, H., Taub, M.A., Beaty, T.H., Marazita, M.L., and Ruczinski, I. (2011). Rapid Testing of SNPs and Gene-Environment Interactions in Case-Parent Trio Data Based on Exact Analytic Parameter Estimation. Biometrics, 68, 766-773.
# Load the simulated data for the analysis. data(trio.data) # Set up a vector with the binary environmental variable. # Here, we consider the gene-gender interactions and # assume that the children in the first 50 trios are # girls, and the remaining 50 are boys. sex <- rep(0:1, each = 50) # Test the interaction of sex with each of the SNPs in mat.test gxe.out <- colGxE(mat.test, sex) # By default, the statistics are shown for the parameters of # the top 5 GxE interactions and the parameters of the # corresponding SNPs. gxe.out # If the top 10 GxE interactions should be displayed, then this # can be done by print(gxe.out, top = 10) # The statististics for all GxE interactions (and SNPs) are # shown, when calling print(gxe.out, top = 0) # If only the statistics for the GxE parameters, but not for # the SNPs should be displayed, then use print(gxe.out, onlyGxE = TRUE) # A convenient way to generate a data frame with all the statistics # computed by colGxE either for the top SNPs or for all SNPs (here, # the top 10 SNPs) ordered by the p-values of one of the considered # tests, e.g., the 2 df likelihood ratio test, is dat.top3 <- getGxEstats(gxe.out, top = 10, sortBy = "lrt2df")