Objective To explore the risk factors of diabetic nephropathy in type 2 diabetes patients,establish a risk prediction model for diabetic nephropathy and provide scientific reference for the prevention and screening of diabetic nephropathy.Methods Clinical data of 1 223 patients admitted at Department of Endocrinology,General Hospital of Ningxia Medical University from January 2018 to December 2022 were retrospectively collected.In the training set,LASSO regression analysis and 10-fold cross-validation were used to screen the optimal feature variables by RStudio 4.2.1 software,and then multivariate logistic regression analysis was used to determine the final predictors selected from LASSO regression to construct the risk prediction model and draw the nomogram diagram.The receiver operating characteristic curve,C-index,calibration curve,and Hosmer-Lemeshow test were used to assess the discrimination and accuracy of the model;and the decision curve analysis was used to assess the clinical validity of the model.Results The multivariate logistic regression analysis showed that the duration of diabetes,glycosylated hemoglobin[odds ratio(OR)=1.14,95%confidence interval(CI):1.05-1.24],serum creatinine(OR=1.02,95%CI:1.01-1.04),25-(OH)-D(OR=0.97,95%CI:0.95-1.00)were the best predictors of diabetic nephropathy in patients with type 2 diabetes(P<0.05).The predictive model was constructed by plotting the nomogram graph based on the predictor variables.In the training cohort,the diabetic nephropathy risk model displayed medium predictive power with a C-index of 0.762(95%CI:0.734-0.790).Meanwhile,the risk model was also well validated in the validation set,where the C-index was 0.742(95%CI:0.689-0.790).Hosmer-Lemeshow test showed excellent degree of fit(P=0.108),and the results of the decision curve analysis showed that the prediction model could be clinically beneficial.Conclusion The establishment of the risk prediction nomogram model provides clinicians with a more convenient and scientific method for early screening and prevention of diabetic nephropathies.