Hey everyone,

I'm inexperienced with statistics, and want to perform a regression between two diseases. I would really appreciate some clarification if my understanding of when to include an interaction term is correct.

Let's call the diseases disease Y and disease X. I know that disease Y is age-dependent, i.e. it's more likely to be encountered in older individuals and it becomes progressively worse with age. So I think the regression should definitely include age as a covariate:

    Y ~ age + X

I'm not sure whether disease X is also age-dependent, but it might be. My planned approach was to look into the data, check if an independent student's t-test detects a significant difference in the age distributions between people with / without disease X. If yes, I would correct the regression formula to include an interaction term:

    Y ~ age + age:X + X

Would this approach be correct?

Additionally, would it matter if my variable Y represents case/control status or disease severity (i.e. logistic vs linear regression)?

It's best practice to first check if your variables are correlated.  If they are, you should either drop one or combine them into one variable.
In R:

    cor.test(your_data$age, your_data$X)

I would drop one of the variables if r >= 0.5, although others may use a different cutoff.  If they are correlated, I would keep the variable with the lowest p-value.  Alternatively, you could combine age and X into one variable by adding them or taking their average.
To find p-values:

    model = lm(Y ~ age + X, data = your_data)
    summary(model)

If age and X are not correlated, then you can see if there is an interaction.

    int.model = lm(Y ~ age + X + age:X, data = your_data)
    summary(int.model)

If the interaction term has a significant p-value, then you'll want to include it in your model.  If not, then you'll want to drop it.
You can use either linear or logistic regression.  For logistic regression, you would use the following:

    logit.model = glm(Y ~ age + X + age:X, data = your_data, family = binomial)
    summary(logit.model)