assocCoxPH | R Documentation |
Fits Cox proportional hazards model
assocCoxPH(genoData,
event,
time.to.event,
gene.action = c("additive", "dominant", "recessive"),
covar = NULL,
ivar = NULL,
strata = NULL,
cluster = NULL,
scan.exclude = NULL,
LRtest = FALSE,
effectAllele = c("minor", "alleleA"),
snpStart = NULL,
snpEnd = NULL,
block.size = 5000,
verbose = TRUE)
genoData |
a |
event |
name of scan annotation variable in |
time.to.event |
name of scan annotation variable in |
gene.action |
"additive" coding sets the marker variable for homozygous minor allele samples = 2, heterozygous samples = 1,
and homozygous major allele samples = 0.
"dominant" coding sets the marker variable for homozygous minor allele samples = 2, heterozygous samples = 2,
and homozygous major allele samples = 0.
"recessive" coding sets the marker variable for homozygous minor allele samples = 2, heterozygous samples = 0,
and homozygous major allele samples = 0.
(If |
covar |
a vector of the names of the covariates to adjust for (columns in the scan annotation of |
ivar |
the name of the variable in |
strata |
a vector of names of variables to stratify on for a stratified analysis |
cluster |
the name of a column (in the scan annotation of |
.
scan.exclude |
a vector of scanIDs for scans to exclude |
LRtest |
logical for whether to perform Likelihood Ratio Tests in addition to Wald tests (which are always performed). |
effectAllele |
whether the effects should be returned in terms of the minor allele for the tested sample ( |
snpStart |
index of the first SNP to analyze, defaults to first SNP |
snpEnd |
index of the last SNP to analyze, defaults to last SNP |
block.size |
number of SNPs to read in at once |
verbose |
logical for whether to print status updates |
This function performs Cox proportional hazards regression of a
survival object (using the Surv
function) on SNP
genotype and other covariates. It uses the coxph
function from the R survival
library.
It is recommended to filter results returned
using 2*MAF*(1-MAF)*n.events > 75
where MAF
= minor allele frequency and n.events
= number of events. This filter was
suggested by Ken Rice and Thomas Lumley, who found that without this requirement, at
threshold levels of significance for genome-wide studies, Cox
regression p-values based on standard asymptotic approximations can be
notably anti-conservative.
Note: Y chromosome SNPs must be analyzed separately because they only use males.
a data.frame with some or all of the following columns:
snpID |
the snpIDs |
chr |
chromosome SNPs are on |
n |
number of samples used to analyze each SNP |
n.events |
number of events in complete cases for each SNP |
effect.allele |
which allele ("A" or "B") is the effect allele |
EAF |
effect allele frequency |
MAF |
minor allele frequency |
maf.filter |
|
Est |
beta estimate for genotype |
SE |
standard error of beta estimate for the genotype |
Wald.Stat |
chi-squared test statistic for association |
Wald.pval |
p-value for association |
LR.Stat |
likelihood ratio test statistic for association |
LR.pval |
p-value for association |
GxE.Est |
beta estimate for the genotype*ivar interaction parameter ( |
GxE.SE |
standard error of beta estimate for the genotype*ivar interaction parameter |
GxE.Stat |
Likelihood ratio test statistic for the genotype*ivar interaction parameter |
GxE.pval |
p-value for the likelihood ratio test statistic |
Cathy Laurie, Matthew Conomos, Stephanie Gogarten, David Levine
GenotypeData
, coxph
library(GWASdata)
data(illuminaScanADF)
scanAnnot <- illuminaScanADF
# exclude duplicated subjects
scan.exclude <- scanAnnot$scanID[scanAnnot$duplicated]
# create some variables for the scans
scanAnnot$sex <- as.factor(scanAnnot$sex)
scanAnnot$age <- rnorm(nrow(scanAnnot), mean=40, sd=10)
scanAnnot$event <- rbinom(nrow(scanAnnot), 1, 0.4)
scanAnnot$ttoe <- rnorm(nrow(scanAnnot), mean=100, sd=10)
# create data object
gdsfile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
gds <- GdsGenotypeReader(gdsfile)
genoData <- GenotypeData(gds, scanAnnot=scanAnnot)
res <- assocCoxPH(genoData,
event="event", time.to.event="ttoe",
covar=c("sex", "age"),
scan.exclude=scan.exclude,
snpStart=1, snpEnd=100)
close(genoData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.