knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(LBRAT)

Use a simulated longitudinal binary phenotype and genotype data with random ascertainment for 1000 subjects, each with 5 repeated measures. Each subject has 2 causal SNPs.

p0 = lbrat_simu(n.sample = 1000, n.time =5, onlypower=T)

Estimate GEE null model:

m0 = lbrat_est.gee(y.long = p0$phe.long, y.cov = p0$phe.cov.long, time = p0$phe.time)

Perform L-BRAT and GEE tests

p_val = lbrat_test(m0, G = p0$snp.mat)
tail(p_val)

where score.pro is GEE score statistics; score.retro is L-BRAT score statistics, pval.pro is GEE P-value and pval.retro is L-BRAT P-value.



ZWang-Lab/LBRAT documentation built on March 12, 2020, 7:26 p.m.