~ confounder_1 + confounder_2 + ...
    family = binomial(), 
    data = .df
  )
  
* # calculate inverse probability weights
* .df &lt;- propensity_model %&gt;%
*   augment(type.predict = "response", data = .df) %&gt;%
*   mutate(wts = 1 / ifelse(exposure == 0, 1 - .fitted, .fitted))
  
  # fit correctly bootsrapped ipw model
  lm(outcome ~ exposure, data = .df, weights = wts) %&gt;% 
    tidy() 
}
```
]

---

&lt;span class = "num"&gt;1&lt;/span&gt; &lt;h3&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  &amp;nbsp; 