powerGcE: powerGcE

View source: R/powerGcE.R

powerGcER Documentation

powerGcE

Description

Evaluate gene by environment interaction with a binary outcome and a normally distributed environmental exposure.

Usage

powerGcE(nCase = 407, nControl = 376, MAF = 0.49, meanE = 0, varE = 0.99, beta0 = -0.32, betaSNP = 0.17, betaE = 0.97, betaI = seq(-1, -0.75, by = 0.05), nSim = 1000, alpha = 5e-08, plot.output = TRUE, plot.name = "powerGcE.pdf", seed = 1)

Arguments

nCase

is the number of cases

nControl

is the number of controls

MAF

is the minor allele frequency for the SNP

meanE

is the mean of the normally distributed environmental exposure

varE

is the variance of the normally distributed environmental exposure

beta0

For the binary outcome Y, the environmental exposure E, and the SNP, logit(P(Y=1))=Beta0+BetaSNP*SNP+BetaE*E+BetaI*SNP*E

betaSNP

For the binary outcome Y, the environmental exposure E, and the SNP, logit(P(Y=1))=Beta0+BetaSNP*SNP+BetaE*E+BetaI*SNP*E

betaE

For the binary outcome Y, the environmental exposure E, and the SNP, logit(P(Y=1))=Beta0+BetaSNP*SNP+BetaE*E+BetaI*SNP*E

betaI

For the binary outcome Y, the environmental exposure E, and the SNP, logit(P(Y=1))=Beta0+BetaSNP*SNP+BetaE*E+BetaI*SNP*E

nSim

is the number of simulations

alpha

is the alpha level, default=0.00000005

plot.output

if true, then a plot is outputted to the working directory.

plot.name

is the name of the plot.

seed

is set for reproducibility.

Value

The SNP is generated from a binomial distribution and the environmental exposure from a normal distribution. Then, the binary outcome is generated from a binomial distribution such that logit(P(Y=1))=Beta0+BetaSNP*SNP+BetaE*E+BetaI*SNP*E where E is the environmental exposure. We exmained the proportion of simulations where the p-value for the interaction term is less than alpha.

Author(s)

Sharon Lutz

Examples

	powerGcE(nCase = 407, nControl = 376, MAF = 0.49, meanE = 0, varE = 0.99, beta0 = -0.32, betaSNP = 0.17, betaE = 0.97, betaI = seq(-1, -0.75, by = 0.05), nSim = 1000, alpha = 5e-08, plot.output = TRUE, plot.name = "GcE.pdf", seed = 1)

SharonLutz/powerGcE documentation built on Nov. 22, 2024, 4:21 p.m.