Is goodness of fit needed for regression models when interpreted causally? I'm investigating associations between socioeconomic factors and dichotomous outcome. I use generalised linear models (GLM) with log link for Bernoulli family, i.e., modelling the prevalence ratio.
At the epidemiology course of K.J. Rothman & E.Hatch we were told, that goodness of fit tests are designed to prediction models and in causal inference it is not important with model fit.
I can not find any reference on that. Can anybody comment on this and suggest a reference? Thank you in advance!
 A: This is correct. In the epidemiology or social science, we would like to find the causal association between, say exposure and outcome. Then the most important thing is to identify the confounding factors, which need to be adjusted in your multivarate model settings. This does not necessarily mean to fit a model well, but only for adjustment purpose which makes ur estimate of interest unbaised due to other factors associated with outcome as well. For example, if we want to study the assocaiton between lung cancer and heavy drinking, then smoking status has to be adjusted as a confounding variable. Because smoking has been recognized as a risk factor of lung cancer. Therefore the heavy drinking status is confounded to the smoking, probably because heavy drinkers usually a smoker too. This is usually the utmost important consideration behind medical research. 
If your purpose is for prediction, then you dont need to think confounding at first place, and you can include interaction terms, 2 ways, three ways interactions as a model budiling procedure, testing goodness-of-fit, and etc. And algorithms such as forward/backward selection are valid to provide a good model.
If you purpose is to provide a valid measure of an effect, then those selections are not quite appropriate. Because even a variable is not significant in a model, it still might be kept in the model such as age and gender, which are always adjusted in those epidemilogy study.  Also the interaction effect might or might not be of interest in the epidemiology study. 
Chapter 6 in the book of "Logistic Regression A Self-learning Text" provides a detailed explanation of model building strategy for what you asked about. 
Cheers. 
A: It is simpler to think in terms of linear models.  The same logic holds with logit and with nonlinear models, though it is more complicated.  For causal interpretation, you need a bunch of assumptions to hold.  I might be missing some.
Here is your model:
$$
y = \delta T + X\beta + \epsilon
$$
$T$ is the variable you care about, $X$ are covariates.  $\epsilon$ is everything else that causes $y$.  
Let's say that $y$ is Donald Trump's logged daily Diet Coke consumption, in milliliters.  $T$ is a dummy variable for Mueller being in the news, and $X$ are numerous controls such as school shootings, the stock market, whether the president's daily brief had too many big words in it, and whether #MAGA is trending on twitter.
Now, Donald Trump will drink lots of diet coke when he is stressed out, and other things make him stressed.  For example, Rachael Maddow.  Now, Rachel Maddow's general relevance to Donald Trump is highly correlated with Mueller being in the news.  But let's say that the staistician doesn't get MSNBC.  Rachael Maddow is unobserved -- therefore it is one component of $\epsilon$.  So the main assumption is
Number 1
$$
E[\epsilon|T,X] = 0
$$
This means that there is nothing that you don't observe that has any effect on $y$, that is also correlated with $T$ or $X$.  (Actually, it only needs to be $E[\epsilon|T] = 0$ when $T$ is orthogonal to $X$.)  
Back to our example:  Rachael Maddow is unobserved to the statistician, is a part of $\epsilon$, and is correlated with $T$.  That means that $\epsilon$ won't be zero in expectation, and your estimate is confounded.  
What can you do?  Either get MSNBC, or find some sort of identification strategy to deal with your confounding problem.  Identification strategies are econometric methods of establishing causality when a naive regression will be biased because of confounding, usually in observational data.
There are some others, having to do with mis-specification, etc.  But they are rather in the weeds and I'm out of time.
Regarding goodness of fit:  you do not need goodness of fit to identify the expectation of Donald Trump's coke drinking given Robert Mueller is in the news, given a sufficiently big sample size.  You just need your assumptions to hold.  Usually, they will not hold, which is why people think that you need a well-fitting model.  After all, a model where $\epsilon = 0$ in the population is one that can be interpreted causally.
A: From Kleinbaum and Klein 2010, logistic regression, p304.

In most epidemiologic analyses, the primary
  goal is to assess an exposure–disease relationship, so that we are usually more interested in
  deriving the “best” model for the relationship
  (which typically involves a strategy requiring
  the comparison of various models) than in
  using a GOF procedure. Nevertheless, once
  we have obtained a final (i.e., best”) model,
  we would also like this model to fit the data
  well, thus justifying a GOF procedure

This is my reasoning: We study asociation through ORs (Sometimes RR) which are related to probabilities. With probabilities you predict. If your predictions are too bad  (there is statistical evidence of lack of fit) so are your probabilities and there for you measure of association (OR) is also a bad one. For me the difference with the prediction goal is the process of fitting the model. In the latter case, we seek maximum prediction power no matter what. In the association case (not causal, as you asked) we seek for valid $\beta$s sacrificing GOT but not too much (to the point where the $\beta$s are useless).
