122S:166Computing in StatisticsMore on LATEXLecture 4Sept. 7, 2007Kate Cowles374 SH, [email protected] graphics files in a LATEX file• include in the preamble\usepackage[dvips]{graphics}• include in the body of the document\begin{figure}[ <h,t,b, or p> ]\begin{center}\scalebox{ <size> }{\includegraphics{ <filename.psor filename.eps> }}\end{center}\caption{ <caption> }\end{figure}– letters h, t, b, and p mean the sa me as intable– <size> in scalebox command means whatmultiple of size of original figure to use(e.g. 0.5 for half)– graphics do not have to be put in figureenvironment3∗ figure environment makes graph “float-ing” and enables adding caption4Adding a bibliography• built-in bibliographi c capabilities in LATEXenable matching references in the body of thetext to entries in the bibliography• creating the bibliography at the end of thearticle\begin{thebibliography}{9} % 9 if < 10 items in biblio;% 99 if 10 - 99, etc.\bibitem{ Cow96 }Cowles, M.K. (1996).Accelerating Markov chain Monte Carlo convergencefor cumulative-link generalized linear models.{\em Statistics and Computing}, {\bf 6}, 101--111.\end{thebibliography}• citing references in the body of the textBlocking may solve the problem of slow convergencein a Gibbs sampler for a cumulative link GLM as shownin~\cite{Cow96}.Blocking may solve the problem of slow con-verg ence in a Gibbs sampler for a cumulativelink GLM as shown in [?].5• you must put entries in bibliog ra phy in orderyo u want them to be listedBibTeX• associated product that can be used withLATEX to prepare bi bliographies• enables you to keep all your references in adatabase• extracts only those that are cited in a partic-ular paper• different style files ava ilable to format thebibliographi c entries and citations in differ-ent standard ways6Some math in LATEX• Greek letters$\theta$, $\Theta$, $\omega$, and $\Omega$θ, Θ, ω, and Ω$\mbox{\boldmath $\theta$}$θ• aligned equations\begin{eqnarray}{\bf y} & \sim & N \left( {\bf X} \mbox{\boldmath $\beta$},\mbox{\boldmath $\Sigma$} \right ) \\\mbox{\boldmath $\Sigma$} & = &\left [ \begin{array}{cc} \sigma_{11} & \sigma_{12} \\\sigma_{21} & \sigma{22} \end{array} \right ]\end{eqnarray}y ∼ N (Xβ, Σ)Σ =σ11σ12σ21σ22(1)• special symbol s7\begin{eqnarray*} % asterisk suppresses numberingy & = & \sqrt{ \frac{q}{r} } \\i = 1, \ldots, n\end{eqnarray*}y =vuuuuutqri = 1, . . . , n8Bibliography[1] Cowles, M.K. (1996). Accelerating Markovchain Monte Carlo convergence forcumulative-link generalized linear mod-els. Statistics and C omputing, 6,
View Full Document