There is a large body of observational data on the effect of diet on incidence of cancer. The problem is that observational studies of diet are prone to confounding because people who eat a particular type of diet are likely to be different in other ways from their comparators. For example, people who eat lots of fruits and vegetables are likely to engage in other health-promoting behaviors compared with those who eat a diet heavy in meat, animal fat, or processed foods. Although sophisticated multivariable modeling, combined with the currently popular propensity scores, can attempt to isolate the impact of a single effect, statistical adjustment of known confounders for observational data is imperfect, and adjustment for unknown or unmeasured confounders, impossible.
Katz MH. Can Diet Prevent Breast Cancer?. JAMA Intern Med. 2015;175(11):1760. doi:10.1001/jamainternmed.2015.5053