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
\]
Assume \(\mathbb{E}[\varepsilon_i \mid X_i] = 0\)
Use least squares to choose \(\hat{\beta}_0, \hat{\beta}_1\)
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}
\]
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
In your own work, what binary outcomes could be modeled with logistic regression?
Which assumptions would you worry about (e.g., linearity in the logit, independence)?
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 <-200dat <-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 appfunction(input, output) {# Fill in the spot we created for a plot output$phonePlot <-renderPlot({# Render a barplotbarplot(WorldPhones[,input$region]*1000, main=input$region,ylab="Number of Telephones",xlab="Year") })}
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.