library(palmerpenguins)
library(fixest)
model <- feols(bill_length_mm ~ bill_depth_mm | species + island,
data = penguins)
partial_df <- partialling_out(model, penguins, both = TRUE)
plot_partial_residuals(partial_df)
Run the code above in your browser using DataLab