Resources for different statistical models

Thank you, Prof Frank Harell.

I refer to the section 4.12 of RMS book, the different models:

  1. Developing Predictive Models
  2. Developing Models for Effect Estimation
  3. Developing Models for Hypothesis Testing

Should univariable pre-screening be avoided for all 3 types of models?
In particular, performing a table 1 or univariable analysis, and selecting those that are significant; but at the same time, include those non-significant ones that may be considered clinically important.

I also refer to other questions here. My impression is that exclusively selecting variables that are significant, should not be done. But, if it’s coupled with variables that are not significant but are clinically important (based on prior knowledge), then is it okay?