t2dex: Simulated example genotype and longitudinal phenotype data.

Description Usage Format Details Source Examples

Description

A simulated example genotype and phenotype dataset for genetic risk score analyses, consisting of genotypes for 2000 individuals at 31 SNPs, baseline case/control and covariate status, and a survival phenotype.

Usage

1

Format

t2dex is a list suitable for use with other functions in this package, see snpdata.

Details

This is a simulated dataset, whose sole purpose is to illustrate the use of functions in this package for genetic risk score analyses.

The dataset is provided so that the usage examples can actually be run, without burdening each example with many lines of code to generate an analysable dataset.

The genotype data were simulated assuming exact Hardy-Weinberg and linkage equilibrium. The phenotypes were simulated using a crude parametric model of a longitudinal study, intended to be used in regression models as if:

Source

The genotypes were simulated using allele frequencies from t2d.scores.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(t2dex)
summary(subset(t2dex$data, select = c("Age", "Overweight", "T2D",
                                      "FollowupDays", "FollowupT2D")))

library(survival)
plot(survfit(Surv(FollowupDays,FollowupT2D) ~ Overweight,
                 data = t2dex$data), col = c("green", "red"))

mycoxph <- coxph(Surv(FollowupDays,FollowupT2D) ~ Overweight,
                 data = t2dex$data) # fit null model
data(t2d.scores)
assoc1 <- grs.onesnp.apply(t2d.scores, mycoxph) # single SNP association
## risk score fit from single SNPs
unlist(grs.summary(t2d.scores$coef, assoc1$beta, assoc1$se,
                   n = length(residuals(mycoxph))))

## compare direct analysis of subject-specific data
t2dex <- grs.make.scores(t2d.scores, t2dex)
coxph(Surv(FollowupDays,FollowupT2D) ~ Overweight + T2D2010.score,
      data = t2dex$data)

Example output

Loading required package: survival
      Age          Overweight          T2D          FollowupDays  
 Min.   :18.00   Min.   :0.0000   Min.   :0.0000   Min.   :   15  
 1st Qu.:22.00   1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.: 3885  
 Median :26.00   Median :0.0000   Median :0.0000   Median : 5912  
 Mean   :26.39   Mean   :0.2925   Mean   :0.1975   Mean   : 6137  
 3rd Qu.:31.00   3rd Qu.:1.0000   3rd Qu.:0.0000   3rd Qu.: 8308  
 Max.   :35.00   Max.   :1.0000   Max.   :1.0000   Max.   :15242  
                                                                  
  FollowupT2D    
 Min.   :0.0000  
 1st Qu.:0.0000  
 Median :0.0000  
 Mean   :0.2891  
 3rd Qu.:1.0000  
 Max.   :1.0000  
 NA's   :395     
           m            n          X2m          R2m         ahat          aSE 
3.100000e+01 1.605000e+03 6.494297e+01 3.965521e-02 5.660855e-01 9.704573e-02 
        X2rs         R2rs         pval          Qrs         phet 
3.402603e+01 2.097688e-02 5.437979e-09 3.091694e+01 4.194988e-01 
Call:
coxph(formula = Surv(FollowupDays, FollowupT2D) ~ Overweight + 
    T2D2010.score, data = t2dex$data)

                 coef exp(coef) se(coef)     z        p
Overweight    0.55320   1.73881  0.09705 5.700 1.20e-08
T2D2010.score 0.57561   1.77821  0.09790 5.879 4.12e-09

Likelihood ratio test=61.09  on 2 df, p=5.421e-14
n= 1605, number of events= 464 
   (395 observations deleted due to missingness)

gtx documentation built on May 2, 2019, 5:08 a.m.