I initially posted this question in CV, but getting no responses or interest, I am deleting it there, and trying my luck in math.stackexchange, hoping that the math details of the following derivation can find someone interested.
Background: Estimation of the multivariate parameters of random effects in regression models. In particular, I am trying to understand Douglas Bates' exposition of the estimation of the vector b of random effects for the lmer function of the lme4 package - there is one step in the reasoning on page 5 of this document that I don't get.
Since we can't observe the actualized values of the random effect vector ($B$) in a regression model with fixed and random effects, we resort to maximum likelihood (or Bayesian (?)) strategies: We do observe the response vector ($Y$), so we focus on the distribution of $B\mid Y=y_\text{observed}$, or its proxy $U\mid Y=y_\text{observed}$, with $B$ being a linear transformation of $U$. So far so good.
He establishes that a pdf, $h(u\mid y, \theta, \beta, \sigma) = f(y\mid u,\theta,\beta,\sigma)\, f(u,\sigma)$ is going to be proportional to the distribution we were after, I suppose $f(u\mid y, \theta, \beta, \sigma)$. This is not explicitly stated, but if the assumption is correct, I guess $U\mid Y$ would really equal, $f(u\mid y, \theta, \beta, \sigma) = \frac{f(y\mid u,\theta,\beta,\sigma)\, f(u,\sigma)}{f(y,\sigma)}$ (?).
And now to the point of the question... The next line states that normalizing $h$ would entail dividing it by $\int_{\mathbb {R}^q}h(u\mid y, \theta, \beta, \sigma)\,du$, $q$ being the number of random effects. This last equation is a likelihood ($\sim$) function $L(\theta,\beta,\sigma\mid y)$. I don't understand this very last step, and I wonder if it constitutes a valid question.
It's basically Bayes Rule. Recall the Bayes Rule formula:
$P(A|B)=\frac{P(A\cap B)}{P(B)}=\frac{P(B|A)P(A)}{\int P(B|A)P(A)dA}$
Basically, we can think of $h$ as $P(B|A)P(A)$ But, what we're really interested in is $P(A|B)$ (the probability of being type A conditional on information B) and in order to get in we need to divide by $\int P(B|A)P(A)dA$
Edit: I scrapped my original preamble since I found it confusing.