Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
avehtari committed Nov 18, 2024
1 parent 6ffe0f0 commit 0e86c0f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
Binary file modified slides/BDA_lecture_10a.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion slides/BDA_lecture_10a.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
\setbeamertemplate{headline}[default]{}
\setbeamertemplate{footline}[split]
% \setbeamertemplate{headline}[text line]{\insertsection}
% \setbeamertemplate{footline}[frame number]
\setbeamertemplate{footline}[frame number]
}

\pdfinfo{
Expand Down
Binary file modified slides/BDA_lecture_10b.pdf
Binary file not shown.
16 changes: 3 additions & 13 deletions slides/BDA_lecture_10b.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
\usepackage{amsbsy}
\usepackage{eucal}
\usepackage{rotating}
\usepackage{listings}
\usepackage{lstbayes}
\usepackage[all,poly,ps,color]{xy}
\usepackage{eurosym}
\usepackage{microtype}
Expand Down Expand Up @@ -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)))
Expand All @@ -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}
Expand Down Expand Up @@ -566,7 +562,7 @@
\begin{itemize}
\item e.g. $\theta \in [0,1]$ presenting probability
\item<+-> Stan code can include constraints\\
\texttt{real<lower=,upper=0> theta;}
\rinline/real<lower=0,upper=0> theta;/
\item<+-> for this, Stan does the inference in unconstrained space
using logit transformation
\item<+-> density of the transformed parameter needs to include
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 0e86c0f

Please sign in to comment.