Both logistic regression and machine learning confirmed that KRAS gene mutation, hyperlipidaemia and pancreatitis are potential risk factors for pancreatic cancer. Here, KRAS is linked to familial pancreatic carcinoma.