plot.trioGxE: Graphical display of gene-environment interaction between a...

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/plot.trioGxE.R


The function plot.trioGxE uses the calculations made in trioGxE and plots the point- and interval-estimates of gene-environment interaction between a single nucleotide polymorphism (SNP) and a continuously varying environmental or non-genetic covariate in case-parent trio data.


## S3 method for class 'trioGxE'
plot(x, se = TRUE, seWithGxE.only = TRUE, ylim = NULL, yscale = TRUE, 
     xlab = NULL, ylab = NULL, rugplot = TRUE, ...)



A returned object produced by trioGxE function.


A logical or a positive number. When TRUE (default), upper and lower lines are added to the plots at 2 standard errors above and below the fitted values of the interaction functions. When it is a positive number, lines are added at se standard errors above and below the fitted interaction values. When FALSE, no standard error lines are plotted.


If TRUE, the associated standard errors reflect the uncertainty in the estimates of the gene-environment interaction functions only. If FALSE, the standard errors include the uncertainty in the genetic main effect estimates.


Either a list holding two length-2 numeric vectors that give different y-coordinate ranges for the two plots, or a single length-2 vector that gives equal y-coordinate ranges for both plots.


If TRUE (default), the same y-axis scale is chosen for each plot. Ignored if ylim is supplied.


An optional string setting the title for the x-axis.


An optional string setting the title for the y-axis.


Logical indicating whether to add rug representation of the data to the plots. Default (TRUE) adds rugs.


Further graphical parameters passed to plot, such as col, lwd, etc.


The function produces two plots in a 2 x 1 layout. The first plot in the left panel displays the estimated gene-environment interaction (GxE) curve related to {\rm GRR}_1, the genotype relative risks (GRRs) among the individuals with one copy of the putative risk allele compared to those with zero copies. The right panel displays the estimated GxE curve related to {\rm GRR}_2, the GRRs among the individuals with two copies of the risk allele compared to those with one copy.

When object$penmod="codominant" (with se=TRUE), confidence intervals are plotted for both interaction curves that are related to {\rm GRR}_1 and {\rm GRR}_2. When object$penmod="dominant", the confidence intervals are plotted only in the left panel, but not in the right panel because {\rm GRR}_2 is not estimated but set to be 1 under this penetrance mode. Similarly, when object$penmod="recessive", the confidence intervals are plotted only in the right panel, but not in the right panel because {\rm GRR}_1 is not estimated but set to be 1 under this penetrance mode. When object$penmod="additive", equivalent confidence intervals are plotted in both panels, which display equivalent fitted curves. This is because {\rm GRR}_1 and {\rm GRR}_2 are set to be equivalent under the log-additive or multiplicative penetrance mode.

When se is TRUE or a positive number, standard error lines are plotted based on the calculations of the Bayesian posterior variance estimates of the generalized additive model parameters for GRRs (Wood, 2006).


Ji-Hyung Shin <>, Brad McNeney <>, Jinko Graham <>


Shin, J.-H. (2012): Inferring gene-environment interaction from case-parent trio data: evaluation of and adjustment for spurious G\times E and development of a data-smoothing method to uncover true G\times E, Ph.D. thesis, Statistics and Actuarial Science, Simon Fraser University: URL

Wood, S. (2006): Generalized Additive Models: An Introduction with R, Boca Raton, FL: Chapman & Hall/CRC.

See Also

trioGxE, test.trioGxE, trioSim



## fitting a co-dominant model to the hypothetical data
simfit <- trioGxE(data=hypoTrioDat,pgenos=c("parent1","parent2"),cgeno="child",cenv="attr",

## produce the graphical display of the point- and interval-estimates of GxE curve 
plot.trioGxE(simfit) # or just plot(simfit)

trioGxE documentation built on May 20, 2017, 5:16 a.m.

Search within the trioGxE package
Search all R packages, documentation and source code