I have a somewhat general question about intensity functions in Poisson random effect models.
Consider the Poisson random effects model in which conditional on a random effect $u$, an individual experiences events according to a Poisson process with intensity function $u\rho(t)$. Furthermore, suppose $u$ has a gamma density $g(u)$, with mean 1 and variance $\phi$. Denote $N(t)$ the number of events, $H(t)$ the history, and $\rho(t)= \mu^{\prime}(t)$.
My goal is to show $$ \lambda(t|H(t)) = \left(\frac{1+\phi N(t^{-})}{1+\phi \mu(t)}\right) \rho(t). $$
Here, we have the intensity $\lambda(t|H(t))$ is given by
$$ \lambda(t|H(t)) = \lim\limits_{\Delta t \to 0}\frac{P(\Delta N(t)=1|H(t))}{\Delta t}. $$
My first thought was the following:
$$ \lambda(t|H(t)) = \int \lambda(t|H(t),u) g(u)du = \int u\rho(t) g(u)du = \rho(t). $$ This is obviously wrong, but I am not sure why. I figured that $\lambda(t|H(t),u)=u\rho(t)$ because conditional on the random effect $u$, we have a Poisson process with intensity $u\rho(t)$, but I could be mistaken.
Edit: Upon further thinking about it, I assume the following statement is incorrect: $$ \lambda(t|H(t)) = \int \lambda(t|H(t),u) g(u)du. $$
The following should hold instead: $$ \lambda(t|H(t)) = \int \lambda(t|H(t),u) g(u|H(t))du. $$
Any thoughts?