# Which statistical tests should I use for predicting one variable with another one?

I want to investigate the association between the serum glucose level of a patient with type 2 diabetes at the baseline (continuous) and distal neuropathy (categorical), $$5$$ years after the diagnosis. I am also interested in knowing whether the age of the patient at the time of diagnosis can predict the risk of distal neuropathy or not, $$5$$ years later. Could you please advise me on the appropriate statistical tests to use? I have the serum glucose level data for each year. Should I use only the baseline amount or include all $$5$$-year data?

• You are investigating an association, you are not predicting. If you want to predict, then decide what you want to predict (e.g., neuropathy), based on what information (glucose level(s) up to 5 years before), use a holdout set to assess your prediction quality, and use appropriate evaluation measures (not accuracy). That is a completely different paradigm, and significance plays a much smaller role. Yes, I know that people misuse the term "predict" in this sense. Please be more careful about your terminology. Commented Dec 25, 2023 at 7:55
• Thank you for your comment dear @StephanKolassa; It was so helpful. Commented Dec 26, 2023 at 9:47

Sounds like you need a logistic regression, with distal neuropathy as a dummy coded event that is coded $$0$$ or $$1$$, where $$P(\text{neuropathy}) = 1$$ You can enter age and time as predictors into the model, with the log odds of distal neuropathy predicted by the following predictors:
$$\text{log}\left[\frac{P(\text{neuropathy})}{1- P(\text{neuropathy}}\right] = \beta_0 \text{Time 1} + \beta_1 \text{Time 2} + \beta_2 \text{Age} + \beta_3 \text{Glucose} + \epsilon$$
where the intercept here is simply Time $$1$$ and the coefficient of Time $$2$$ is a contrast between Time $$1$$ and Time $$2$$. There is also nothing stopping you from modeling the change every year if you feel it is important to document. If you are just interested in the baseline and $$5$$ year follow up, then you can just model that. Keep in mind that entering every year will give you a lot more coefficients ($$7$$ if my calculation is correct), so make sure you have sufficient data to estimate that many unknowns.