Replicating PLINK results in R (linear and linear mixed models)

184 views
Skip to first unread message

Lucía Sánchez García

unread,
Jan 10, 2023, 5:38:17 AM1/10/23
to plink2-users
Hello,

I've been using Plink 1.9 to perform an association analysis and trying to replicate my results in R then.

Firstly, I performed an association analysis with the --assoc flag:
plink --bfile SNPs --pheno AER_max.phenotype --all-pheno --allow-no-sex --assoc --out assoc_results
My phenotype file only contains one phenotype (quantitative). 

When I ran my code in R, I used a linear model (lm(AER_max ~ SNPs, data = df)), obtaining the same results as using PLINK.

After that, I introduced two covariables and applied the --linear flag:
plink --bfile SNPs --pheno AER_max.phenotype --all-pheno --allow-no-sex --covar covars.txt --linear --out linear_results

Again, I ran the code in R to get the same results. In this case, I used a linear mixed model, to establish the covariables (Age and Gender) as random effects.
lmer(AER_max ~ SNPs + (1|Age) + (1|Gender), data = df). The results for that analysis are slightly different than the ones obtained from PLINK and I'd like to know If I'm interpreting wrongly what PLINK is doing.

Thank you in advance.

Christopher Chang

unread,
Jan 10, 2023, 12:26:44 PM1/10/23
to plink2-users
PLINK just performs linear or logistic regression, it does not solve a linear mixed model.  This is explicitly commented on in the second usage note of https://www.cog-genomics.org/plink/2.0/assoc#glm .

Lucía Sánchez García

unread,
Jan 17, 2023, 4:09:38 AM1/17/23
to plink2-users
Thank you very much.
Reply all
Reply to author
Forward
0 new messages