Learn R Programming

trioGxE (version 0.1-1)

plot.trioGxE: Graphical display of gene-environment interaction between a SNP and a continuous non-genetic attribute in case-parent trio data

Description

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.

Usage

"plot"(x, se = TRUE, seWithGxE.only = TRUE, ylim = NULL, yscale = TRUE, xlab = NULL, ylab = NULL, rugplot = TRUE, ...)

Arguments

x
A returned object produced by trioGxE function.
se
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.
seWithGxE.only
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.
ylim
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.
yscale
If TRUE (default), the same y-axis scale is chosen for each plot. Ignored if ylim is supplied.
xlab
An optional string setting the title for the x-axis.
ylab
An optional string setting the title for the y-axis.
rugplot
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.

Details

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).

References

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 https://theses.lib.sfu.ca/sites/all/files/public_copies/etd7214-j-shin-etd7214jshin.pdf.

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

See Also

trioGxE, test.trioGxE, trioSim

Examples

Run this code
data(hypoTrioDat)

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

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

Run the code above in your browser using DataLab