For example, age analyzed with 4 other variables then analyzed with 8 variables the second time. Can the AUC and p value for the age change in both analysis situations?
Depends, If you're computing the ROC curve + AUC for a single variable (e.g., age) alone, then adding other variables to the model does not change the ROC/AUC for age alone since you're not conditioning on the others.
"age analyzed with 4 other variables then with 8 variables" - if you refer to multivariable models where age is included as one of several predictors, then 100% yes, AUC and the p-value associated with age can absolutely change
If you're using a univariate ROC curve, where you test just one variable against a binary outcome, then:
AUC (Area Under Curve) and p-value should stay the same, no matter what other variables you're analyzing elsewhere.
That’s because you're only assessing the discriminative power of that single variable independently.
But if you're using multivariate models like logistic regression, and you compute ROC curves and AUCs based on predicted probabilities from the full model (including multiple variables), then:
The AUC for each model can change depending on which other variables are included.
The p-value for a variable can also change, since it depends on the unique contribution of that variable given the others (i.e. adjusted effect).