4

When I use the code below, I find blank lines before and after the equations. How do I remove these blank lines?

\documentclass[12pt]{report}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{bm}

\begin{document}
\begin{enumerate}
\item Draw $\theta_n$ from the full conditional
\begin{align*}
\pi(\theta_n|\bm{\omega}_i,\bm{\xi},\textbf{Y}) &\propto  \prod_{i=1}^I
\left[\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{y_{ni}}
\left[1-\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{1-      y_{ni}}\\
&\times
\text{n}(\theta_n|0,1),\quad\text{independently for $n=1,\dots,N$.}
\end{align*}
\item Draw $\bm{\omega}_i$ from the full conditional
\begin{align*}
\pi(\bm{\omega}_i|\theta_n,\bm{\omega}_i\bm{\xi},\textbf{Y}) &\propto
\prod_{i=1}^I
\left[\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{y_{ni}}
\left[1-\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{1-    y_{ni}}\\
&\times
\text{dir}    (\bm{\omega}_i|\alpha_{i1},\dots,\alpha_{im}),\quad\text{independently for     $i=1,\dots,I$.}
\end{align*}
\item Draw $\bm{\xi}$ from the full conditional
\begin{align*}
\pi(\bm{\xi}|\theta_n,\bm{\omega}_i,\textbf{Y}) &\propto \prod_{n=1}^N     \prod_{n=1}^N
\left[\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{y_{ni}}
\left[1-\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{1-y_{ni}}\\
&\times
\text{U}(\xi_1|0.1,m)\text{U}(\xi_2|0.1,m),\quad\text{independently for     $n=1,\dots,N$ and $i=1,\dots,I$.}
\end{align*}
\end{enumerate}
\end{document}

Thanks in advance.

2
\begin{enumerate}\abovedisplayskip=0pt
    \item Draw $\theta_n$ from the full conditional
    \begin{align*}
     ...

enter image description here

1
  • I knew there was a way to do this. Thanks, @Herbert! May 27 '17 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.