everyone. I am trying to set up a logistic model to predict potential risk/probability of overweight according to the gene SNPs in hundreds of individuals. Currently, I have set up this model and want to use a csv file to test but the error occurs and says that Error in model.frame.default: variable lengths differ (found for ‘lagged_residuals’)”

the codes for setting up the model and predicting codes are logistc modelpredicting

so is my model wrong in terms of lagged_residuals or how to adjust the dataset to successfully predict the dataset?
Thank you

New contributor

Why Y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.