smgogarten / GWASTools

Classes for storing very large GWAS data sets and annotation, and functions for GWAS data cleaning and analysis
https://bioconductor.org/packages/GWASTools
16 stars 6 forks source link

Using 'Cluster()' option of CoxPH in AssocCoxPH #6

Closed Soo-Heon closed 4 years ago

Soo-Heon commented 4 years ago

Hi!

I have a cohort that is derived from related individuals. I am planning to do an analysis adjusting for the relatedness (or family cluster). The original CoxPH function has option for "cluster()", which provides robust variance result as shown below. So one of my mentors suggested that we might include familyID in the "cluster()" option for CoxPH. Is there a way to enable this "cluster()" option of the original CoxPH function in the AssocCoxPH?

Thank you so much!

Sean

https://www.rdocumentation.org/packages/survival/versions/3.1-8/topics/coxph
cluster optional variable which clusters the observations, for the purposes of a robust variance. If present, it implies "robust". This variable will normally be found in "data".

smgogarten commented 4 years ago

This is not currently an option in assocCoxPH, but I think it would be straightforward to add by modifying this line: https://github.com/smgogarten/GWASTools/blob/master/R/assocCoxPH.R#L66

I'll put it on my to-do list, but a pull request would be welcome if you don't want to wait a few weeks.

smgogarten commented 4 years ago

Commit https://github.com/smgogarten/GWASTools/commit/8a3fd585f6ed51c8e8ddf7b1cb22f14f0dae6cd7 (GWASTools v1.33.3) adds a cluster argument to assocCoxPH.