A significant protective effect of cognitive function (moca) against depression was observed exclusively in women (β = −0.074, p = 0.009), with no evidence of association in men (β = −0.015, p = 0.492). This evidence concerns the gene DOCK3 and depressive disorder.