Sex in covariate file and .fam file

11 views
Skip to first unread message

junling REN

unread,
Sep 14, 2025, 10:42:51 AM (8 days ago) Sep 14
to plink2...@googlegroups.com
Hi,

I am using plink2 to run the logistic regression for X chromosome. The sex information was saved in the .fam file. When I put sex in the covariate file, and run plink2 by plink2 -bfile -covar -covar-name sex,age,pc1… -logistic  cold=+alfreq, +machr2, +beta hide-covar -covar-variance-standardize -out, it shows me the high correlation and the redundant Sex information. When I remove sex from covariate file, the error disappears. My question is: does plink2 automatically apply sex information from .fam file as a covarible even there is no sex in covariate file when run the data of X chromosome?


Thank you in advance.

Junling 

Chris Chang

unread,
Sep 15, 2025, 12:51:08 PM (7 days ago) Sep 15
to junling REN, plink2...@googlegroups.com
From https://www.cog-genomics.org/plink/2.0/assoc#sex :

"chrX is special in two ways:
- First, sex (as defined in the .fam/.psam input file) is normally included as an additional covariate. If you don't want this, add the 'no-x-sex' modifier. Or you can add the 'sex' modifier to include .fam/.psam sex as a covariate everywhere. Whatever you do, don't include sex from the .fam/.psam file and the --covar file at the same time; otherwise the duplicated column will cause the regression to fail."

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plink2-users/CANdRq%2BX-_uiqv3NBApD4xdbvvCVhSAD4g2y%3DbG6-4W2x7i%3D7pQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages