diff --git a/slides/BDA_lecture_10a.pdf b/slides/BDA_lecture_10a.pdf index ddf8cf79..cee77b14 100644 Binary files a/slides/BDA_lecture_10a.pdf and b/slides/BDA_lecture_10a.pdf differ diff --git a/slides/BDA_lecture_10a.tex b/slides/BDA_lecture_10a.tex index 4c0bca62..413f98f9 100644 --- a/slides/BDA_lecture_10a.tex +++ b/slides/BDA_lecture_10a.tex @@ -33,7 +33,7 @@ \setbeamertemplate{headline}[default]{} \setbeamertemplate{footline}[split] % \setbeamertemplate{headline}[text line]{\insertsection} - % \setbeamertemplate{footline}[frame number] + \setbeamertemplate{footline}[frame number] } \pdfinfo{ diff --git a/slides/BDA_lecture_10b.pdf b/slides/BDA_lecture_10b.pdf index d91a5ea9..6c11de06 100644 Binary files a/slides/BDA_lecture_10b.pdf and b/slides/BDA_lecture_10b.pdf differ diff --git a/slides/BDA_lecture_10b.tex b/slides/BDA_lecture_10b.tex index b0bed607..0b3a5dc4 100644 --- a/slides/BDA_lecture_10b.tex +++ b/slides/BDA_lecture_10b.tex @@ -29,8 +29,6 @@ \usepackage{amsbsy} \usepackage{eucal} \usepackage{rotating} -\usepackage{listings} -\usepackage{lstbayes} \usepackage[all,poly,ps,color]{xy} \usepackage{eurosym} \usepackage{microtype} @@ -448,8 +446,7 @@ \item iterative optimization to find a mode (may use gradients) \item autodiff or finite-difference for gradients and Hessian \item<2> e.g. in R, demo4\_1.R: - {\scriptsize -\begin{lstlisting}[] +\begin{minted}[fontsize=\footnotesize]{r} bioassayfun <- function(w, df) { z <- w[1] + w[2]*df$x -sum(df$y*(z) - df$n*log1p(exp(z))) @@ -459,8 +456,7 @@ optimres <- optim(w0, bioassayfun, gr=NULL, df1, hessian=T) thetahat <- optimres$par Sigma <- solve(optimres$hessian) -\end{lstlisting} - } +\end{minted} \end{itemize} \end{itemize} \end{frame} @@ -566,7 +562,7 @@ \begin{itemize} \item e.g. $\theta \in [0,1]$ presenting probability \item<+-> Stan code can include constraints\\ - \texttt{real theta;} + \rinline/real theta;/ \item<+-> for this, Stan does the inference in unconstrained space using logit transformation \item<+-> density of the transformed parameter needs to include @@ -817,12 +813,6 @@ fit1 <- brm(..., %\highlight{algorithm = "fullrank"}%) \end{minted} -% \begin{minted}[fontsize=\footnotesize]{r} -% fit1 <- brm(..., algorithm = "laplace") - -% fit1 <- brm(..., algorithm = "pathfinder") -% \end{minted} - \end{frame} \end{document}