メモ

install.packages("SimHap")
library(SimHap)
data(SNPsurv.dat)

# transforms SNPlong.dat to an object containing 3 columns
# per SNP - additive, dominant and recessive, where genotypes
# defined in 'baseline' serve as the baseline genotypes
survGeno.dat <- SNP2Geno(SNPsurv.dat, baseline=c("V2V2", "GG", "CC"))

data(survPheno.dat)
mymodel <- snp.surv(formula1=Surv(time, status)~age+SNP_1_add, 
        formula2=Surv(time, status)~age, geno=survGeno.dat, 
        pheno=survPheno.dat)
summary(mymodel)

# example with subsetting variable
mymodel <- snp.surv(formula1=Surv(time, status)~age+SNP_1_add, 
        formula2=Surv(time, status)~age, pheno=survPheno.dat, 
        geno=survGeno.dat, sub=expression(sex==1))
    • その出力
> summary(mymodel)

Call:
Surv(time, status) ~ age + SNP_1_add

Likelihood Ratio Test: Model without genetic covariates vs model with genetic covariates:
               logLik df     LR P.Value
Full model  -183.0081  2 0.0762  0.7825
Non-genetic -183.0462  1               

Residuals:
    Min      1Q  Median      3Q     Max 
-3.4114 -0.3894  0.1569  0.6570  0.9859 

Coefficients:
              HR HR.lower HR.upper P.Value
age       1.0066   0.9881    1.025    0.49
SNP_1_add 0.9487   0.6521    1.380    0.78

R-squared:
               R-Squared
Without SNPs       0.006
Including SNPs     0.007
Max R-Squared      0.993


Wald Statistic: 
 Wald test df P-value
      0.49  2  0.7833