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.

Estimate GEE null model:

m0 = lbrat_est.gee(y.long = p0$phe.long, y.cov = p0$phe.cov.long, time = p0$phe.time)
#> Phenotype is dichotomous, fitting logistic link ......

Perform L-BRAT and GEE tests

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.