# test.trioGxE: Test of gene-environment interaction between a SNP and a...

### Description

Performs permutation test of gene-environment interaction based on the associated penalized maximum likelihood estimates obtained by fitting a generalized additive model to case-parent trio data.

### Usage

 1 2 3 test.trioGxE(object, data = NULL, nreps, level = 0.05, early.stop = FALSE, fix.sp = FALSE, output = NULL, return.data = FALSE, return.object = FALSE, ...) 

### Arguments

 object A returned object from trioGxE function. When NULL, a data set of case-parent trios must be provided (through 'data' argument). data Trio data to be passed into trioGxE when 'object' is not provided. nreps Desired number of permutation replicates. fix.sp When TRUE, the approximated null distribution of the test statistic is obtained by computing the test statistic by fitting each simulated data set under fixed values of the smoothing parameters. When FALSE (Default), the null distribution is obtained by fitting each simulated data set while simultaneously estimating the smoothing parameter values. level Desired significance level for the test. early.stop When TRUE, sampling is terminated early when the number of test statistics that are more extreme than or as extreme as the observed test statistic equals nreps*level. \code{nreps} \times \code{level} values larger than the observed test statistic are obtained. output A character string specifying the name of the output file that writes the values of the test statistics calculated for the actual and simulated data set. When NULL (Default), no written output file is produced. return.data When TRUE, the original data set is returned. return.object When TRUE, the fitting object for the original data set is returned. ... Arguments passed to trioGxE: when data is provided, instead of trioGxE class object, parameters of trioGxE must be provided through ....

### Details

Suppose k_1 and k_2 are the numbers of knots used to represent the interaction functions f_1 and f_2, respectively, via cubic regression spline functions. Let \bm{c}_1 = (c_{11},...,c_{1K_1-1})^\prime and \bm{c}_2 = (c_{21},...,c_{2K_2-1})^\prime are the spline coefficient vectors for f_1 and f_2 that satisfy model identifiability constraints.

The function test.trioGxE calculates test statistic T,

T = t(\hat{\bm{c}}){\rm V}^{-1}(\bm{c})\hat{\bm{c}},

where \bm{c}=(\bm{c}_1^{\prime},\bm{c}_2^{\prime})^{\prime} and V_c is a square matrix of size (k_1+k_2-2), formed by extracting the rows and columns, corresponding to the spline coefficients from the Bayesian posterior variance-covariance matrix calculated in trioGxE.

### Author(s)

Ji-Hyung Shin <shin@sfu.ca>, Brad McNeney <mcneney@sfu.ca>, Jinko Graham <jgraham@sfu.ca>

### References

Umbach, D. and Weinberg, C. (2000). The use of case-parent triads to study joint effects of genotype and exposure. Am J Hum Gen, 66:251-61.

Besag, J. and P. Clifford (1991). Sequential Monte Carlo p-values. Biometrika, 78:301-304.

trioGxE, plot.trioGxE, trioSim

### Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 data(hypoTrioDat) example.fit <- trioGxE(hypoTrioDat, pgenos = c("parent1","parent2"), cgeno = "child", cenv = "attr",penmod="codominant", k=c(5,5)) # A toy example with 'few' permutation replicates example.test <- test.trioGxE(example.fit, nreps=10, early.stop = FALSE, output=NULL) ## Not run: ## More proper examples of permutation tests with 5000 replicates ## Example1: does not generate an output file containing test statistic values example.test1 <- test.trioGxE(example.fit, nreps=5000, early.stop = TRUE, output=NULL) ## Example 2: generates an output file 'myoutput.out' containing test statistic values example.test2 <- test.trioGxE(example.fit, nreps=5000, early.stop = TRUE, output="myoutput.out") ## End(Not run) 

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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.