The study mentions these limitations:
> Considering that sun exposure is the most important natural source of vitamin D, the lack of information on participant-level exposure to sunlight can be considered another limitation of the present study.
> While we included education in our models, the NACC dataset has a dearth of information related to SES and therefore, SES differences could not be accounted for in our study. Future studies using cohorts with more comprehensive data on SES and other social factors would certainly provide valuable information on the associations of SES with exposure to supplementation and risk of dementia.
For what it’s worth, controlling for a variable like education can only partially remove related bias from a result (you don’t have a perfect measure of how a person decided to take vitamin D).