Applies either observation-level HC sandwich (via [mgcv::vcov.gam()]) or cluster-robust sandwich (CR1 via [gam_sandwich_cluster()] or CL2 via [gam_sandwich_cluster_cl2()]) to a fitted pffr model.
apply_sandwich_correction(m, algorithm, type = "cluster")Model with corrected covariance matrices.
Fitted model.
Algorithm symbol.
`"cluster"` (default) for CR1 cluster-robust, `"cl2"` for leverage-adjusted cluster-robust CL2, or `"hc"` for observation-level HC.