I have the following model:
$$ y\sim\textrm{N}\left(\mu,\Sigma\right)\\ p=\textrm{logistic}\left(y\right)\\ k\sim\textrm{Binomial}\left(p,n\right) $$$$ y\sim\textrm{MvNormal}\left(\mu,\Sigma\right)\\ p=\textrm{logistic}\left(y\right)\\ k\sim\textrm{Binomial}\left(p,n\right) $$
Where $\mu$ and $\Sigma$ are free parameters, and $k$ and $n$ are known. What is the likelihood or log-likelihood function of this model? I know the likelihoods of the multivariate normal and binomial distributions, but how do I combine them to find the likelihood of this hierarchical model?
If there is one, I would like to know the general method for finding likelihoods of these kinds of hierarchical models. Another model I'm interested in is:
$$ y\sim\textrm{N}\left(\mu,\Sigma\right)\\ \lambda=\textrm{exp}\left(y\right)\\ x\sim\textrm{Poisson}\left(\lambda\right) $$$$ y\sim\textrm{MvNormal}\left(\mu,\Sigma\right)\\ \lambda=\textrm{exp}\left(y\right)\\ x\sim\textrm{Poisson}\left(\lambda\right) $$
where $x$ is known.