UW Slide Template Library

Reusable Academic & Teaching Slides

Carlos Pineda-Antunez

How to use this template library

  • This file is a library of slide examples
  • We can copy–paste any slide we like into our actual presentation .qmd
  • All slides use the UW theme from uw.css
  • We can safely delete sections we don’t need
  • This delimiter ----------- is used to separate slides although is not necessary

Example slide for incremntal bullet points

By the end of this section, participants should be able to:

  • Explain the intuition behind [method / concept]
  • Describe the key assumptions required for valid inference
  • Implement a simple example in R and interpret the output
  • Discuss when this method is appropriate in HEOR

Example of Key definition / concept slide

We can use this for central definitions like ICER, odds ratio, etc.

Definition: Incremental Cost-Effectiveness Ratio (ICER)

The ICER compares two strategies, 1 and 0:

\[ \text{ICER} = \frac{C_1 - C_0}{E_1 - E_0} \]

where \(C\) is cost and \(E\) is effectiveness (e.g., QALYs).

  • If the denominator is small, ICERs can be unstable
  • We often complement ICERs with Net Monetary Benefit (NMB)
  • Choice of WTP threshold is crucial for interpretation

Worked example / derivation

We can reveal derivation steps gradually.

We want to estimate the effect of \(X\) on \(Y\):

\[ Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i \]

  1. Assume \(\mathbb{E}[\varepsilon_i \mid X_i] = 0\)
  2. Use least squares to choose \(\hat{\beta}_0, \hat{\beta}_1\)
  3. The slope estimator can be written as: \[ \hat{\beta}_1 = \frac{\sum_i (X_i - \bar{X})(Y_i - \bar{Y})} {\sum_i (X_i - \bar{X})^2} \]
  4. Interpretation (HEOR):
    “A one-unit increase in \(X\) is associated with an average change of \(\hat{\beta}_1\) units in \(Y\), under the model assumptions.”

Example of quick quiz

Question

A logistic regression model estimates the log-odds of screening uptake.
Which of the following is not an appropriate interpretation?

  • A. The exponentiated coefficient gives an odds ratio

  • B. The model assumes a logit link between predictors and probabilities

  • C. The linear predictor can be interpreted as a risk difference

  • D. We can obtain predicted probabilities from the model

  • Answer:

  • The incorrect statement is C (the linear predictor is on the log-odds scale, not a risk difference).

Activity / discussion slide

  1. In your own work, what binary outcomes could be modeled with logistic regression?
  2. Which assumptions would you worry about (e.g., linearity in the logit, independence)?
  3. How would you communicate model results to a non-technical policymaker?

Be ready to share one concrete example from your discussion.

Fragments (1)

Incremental text display and animation with fragments:


Fade in

Slide up while fading in

Slide left while fading in

Fade in then semi out

Fragments (2)

Incremental text display and animation with fragments:


Strike

Highlight red

First item to be unblurred

Second one to be revealed

Code + output (R example)

Example: logistic regression for CRC screening uptake.

library(dplyr)
library(pander)

set.seed(123)
n <- 200

dat <- tibble(
  age      = rnorm(n, mean = 55, sd = 7),
  insured  = rbinom(n, 1, 0.7),
  screened = rbinom(n, 1, plogis(-5 + 0.06 * age + 0.8 * insured))
)

fit <- glm(screened ~ age + insured,
           data = dat,
           family = binomial)

pander(summary(fit),
       caption = "Logistic regression results for CRC screening uptake",
       digits = 3,
       split.table = 80,
       style = "rmarkdown",
       missing = "NA")
  Estimate Std. Error z value Pr(>
(Intercept) -6.27 1.56 -4.01 6.13e-05
age 0.0827 0.0265 3.12 0.00182
insured 0.84 0.404 2.08 0.0375

(Dispersion parameter for binomial family taken to be 1 )

Null deviance: 229.2 on 199 degrees of freedom
Residual deviance: 214.3 on 197 degrees of freedom
  • age has a positive association with screening probability
  • Being insured increases the odds of screening
  • Coefficients can be exponentiated to get odds ratios

Code Animations

  • Over 20 syntax highlighting themes available
  • Default theme optimized for accessibility
# Define a server for the Shiny app
function(input, output) {
  
  # Fill in the spot we created for a plot
  output$phonePlot <- renderPlot({
    # Render a barplot
    barplot(WorldPhones[,input$region]*1000, 
            main=input$region,
            ylab="Number of Telephones",
            xlab="Year")
  })
}

Line Highlighting

  • Highlight specific lines for emphasis
  • Incrementally highlight additional lines
import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()

Executable Code

library(ggplot2)
ggplot(mtcars, aes(hp, mpg, color = am)) +
  geom_point() +
  geom_smooth(formula = y ~ x, method = "loess")

LaTeX Equations

MathJax rendering of equations to HTML

\begin{gather*}
a_1=b_1+c_1\\
a_2=b_2+c_2-d_2+e_2
\end{gather*}

\begin{align}
a_{11}& =b_{11}&
  a_{12}& =b_{12}\\
a_{21}& =b_{21}&
  a_{22}& =b_{22}+c_{22}
\end{align}
\[\begin{gather*} a_1=b_1+c_1\\ a_2=b_2+c_2-d_2+e_2 \end{gather*}\] \[\begin{align} a_{11}& =b_{11}& a_{12}& =b_{12}\\ a_{21}& =b_{21}& a_{22}& =b_{22}+c_{22} \end{align}\]

Column Layout

Arrange content into columns of varying widths:

Motor Trend Car Road Tests

The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles.

mpg cyl disp hp wt
Mazda RX4 21.0 6 160 110 2.620
Mazda RX4 Wag 21.0 6 160 110 2.875
Datsun 710 22.8 4 108 93 2.320
Hornet 4 Drive 21.4 6 258 110 3.215
Hornet Sportabout 18.7 8 360 175 3.440
Valiant 18.1 6 225 105 3.460

Slide Backgrounds

Set the background attribute on a slide to change the background color (all CSS color formats are supported).

Different background transitions are available via the background-transition option.

Auto-Animate

Automatically animate matching elements across slides with Auto-Animate.

Auto-Animate

Automatically animate matching elements across slides with Auto-Animate.

Tabsets

library(ggplot2)
ggplot(mtcars, aes(hp, mpg, color = am)) +
  geom_point() +
  geom_smooth(formula = y ~ x, method = "loess")

knitr::kable(mtcars)
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4
Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1
Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1
Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2
Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1
Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4
Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2
Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2
Merc 280 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4
Merc 280C 17.8 6 167.6 123 3.92 3.440 18.90 1 0 4 4
Merc 450SE 16.4 8 275.8 180 3.07 4.070 17.40 0 0 3 3
Merc 450SL 17.3 8 275.8 180 3.07 3.730 17.60 0 0 3 3
Merc 450SLC 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3
Cadillac Fleetwood 10.4 8 472.0 205 2.93 5.250 17.98 0 0 3 4
Lincoln Continental 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4
Chrysler Imperial 14.7 8 440.0 230 3.23 5.345 17.42 0 0 3 4
Fiat 128 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1
Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2
Toyota Corolla 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1
Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1
Dodge Challenger 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2
AMC Javelin 15.2 8 304.0 150 3.15 3.435 17.30 0 0 3 2
Camaro Z28 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4
Pontiac Firebird 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2
Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1
Porsche 914-2 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2
Lotus Europa 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2
Ford Pantera L 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4
Ferrari Dino 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6
Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8
Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2

Interactive Slides

Include Jupyter widgets and htmlwidgets in your presentations

Table slide with smaller font

Baseline characteristics (demo)
n mean_age sd_age prop_ins prop_scr
200 55 6.6 0.7 0.26

Tip: the class: small-table option shrinks the font size for dense tables.

Chalkboard

Free form drawing and slide annotations

Use the chalkboard button at the bottom left of the slide to toggle the chalkboard.

Use the notes canvas button at the bottom left of the slide to toggle drawing on top of the current slide.

You can also press b to toggle the chalkboard or c to toggle the notes canvas.

Interactive tabset (multiple tables)

Baseline characteristics
n mean_age sd_age prop_ins prop_scr
200.00 54.94 6.60 0.69 0.26
Logistic regression model estimates
estimate std.error statistic p.value
(Intercept) −6.272 1.565 −4.008 0.000
age 0.083 0.027 3.118 0.002
insured 0.840 0.404 2.080 0.038

Interactive plot (plotly scatter)

Dynamic Simulation Plot – 10 Random Walks

This slide shows 10 independent random walks. Each line is a trajectory, and the animation reveals them step by step.

Microsimulation vs DES – Loop Iterations

This animation focuses on how many loop iterations each approach needs to reach the absorbing state (Dead) over a 30-year horizon.

Dynamic PSA CE-Plane “Movie”

This slide shows a dynamic cost-effectiveness (CE) plane.
Each frame reveals a new batch of PSA draws for incremental cost vs. incremental QALYs.

Process Diagram (Animated)

This example shows a simple modeling workflow. Each step will appear one by one as you advance through the slide.

1. Define Question

Clarify population, intervention, comparator, outcomes, and time horizon.

2. Collect Data

Assemble data on epidemiology, costs, and health outcomes from valid sources.

3. Build Model

Choose structure (e.g., decision tree, Markov, DES) and parameter inputs.

4. Analyze & Communicate

Run scenarios, perform sensitivity analyses, and present clear recommendations.

Process Diagram (Horizontal Pipeline)

This version shows a left-to-right workflow with arrows between steps.
Each step appears as you advance through the slide.

1. Define Question

Clarify population, intervention, comparator, outcomes, and time horizon.

2. Collect Data

Assemble data on epidemiology, costs, and health outcomes from valid sources.

3. Build Model

Choose structure (e.g., decision tree, Markov, DES) and parameter inputs.

4. Analyze & Communicate

Run scenarios, perform sensitivity analyses, and present clear recommendations.

Embedding a Shiny app via iframe

Embedding a web page via iframe

References (manual list)

Use this version if you don’t want BibTeX / citation keys.

  • Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press; 2006.
  • Jansen JP, et al. Indirect treatment comparison / network meta-analysis… Value Health. 2014;17(2):157–173.
  • Hunink MGM, et al. Decision Making in Health and Medicine. Cambridge University Press; 2014.

References with citation keys (if using BibTeX)

class: uw-ref-slide

If We want Quarto to build references automatically:

  1. Create a refs.bib file in the same folder
  2. Add bibliography: refs.bib and link-citations: true to the YAML
  3. Use citation keys like this in the text: Rubin (1978), Heckman (1979), etc.

Then add a slide with the references (next slide):

References

Heckman, James J. 1979. “Sample Selection Bias as a Specification Error.” Econometrica 47 (1): 153–61.
Rubin, Donald B. 1978. “Bayesian Inference for Causal Effects.” Annals of Statistics 6 (1): 34–58.

Key takeaways slide

Use this to close a section or the whole talk.

  • Statistical models are tools to answer specific questions, not magic boxes
  • Always check whether the assumptions are at least somewhat plausible
  • Complement ICERs with NMB and transparent uncertainty communication
  • For teaching: mix theory, code, and interpretation with interactive elements
University of Washington
Slide outline