Skip to content

Instantly share code, notes, and snippets.

View julianhinz's full-sized avatar

Julian Hinz julianhinz

View GitHub Profile
@vincentarelbundock
vincentarelbundock / bboot_vab.R
Last active February 7, 2022 21:38
Bayesian bootstrap in `R` with `update()`
library(fixest)
library(data.table)
library(insight)
bboot_vab <- function(model, reps = 1e3, conf.level = .95, cluster = NULL) {
data <- insight::get_data(model)
setDT(data)
if (!is.null(cluster)) {
if (anyNA(data[[cluster]])) {
stop("The cluster variable cannot include missing values.")