Can plink2 add an --weights option to allow weighted association test?

Skip to first unread message

Han Zhang

Apr 9, 2015, 12:52:53 PM4/9/15

In many commonly used packages for performing generalized linear regression model, e.g., glm and lm in R, they provides an option weights to allow the users to performed weighted test. This is particular useful when the data in plink files are collected from different types of studies. In that situation, a proper way to test the genetic association is to incorporate weights into the model so that the data are "converted" into the general population. For example, I have a retrospective case-control study A and a prospective cohort study B. Obviously, an individual from study A doesn't contribute equally compared with an individual from study B. Simply fit a logistic regression on the combined data by assuming weights = 1 will give biased result.

Can the plink2 develop team add such option in next release? I am afraid that, to incorporate weights, plink2 cannot use the bitwise operations any more to speedup the testing procedure. 

Please let me know if the option is actually present and I just simply didn't find it. I am also glad if the option is not available right now and the developer think I could be helpful to join the development.



Christopher Chang

Apr 9, 2015, 9:42:07 PM4/9/15
The linear and logistic regressions aren't based on bitwise operations anyway, and I think there's a LAPACK routine for weighted linear regression.  So a --sample-weights flag is likely to be added.

However, weighted logistic regression will be a bit difficult to implement because the current logistic regression code is from a third party and contains a lot of hand-rolled SSE instructions.  You are welcome to try your hand at adding that feature if you want it sooner rather than later.
Reply all
Reply to author
0 new messages