Open vincentarelbundock opened 2 months ago
Dear Vincent,
First, I have to thank you for your great package.
Next, I want to ask you if it is possible to add the calculation of robust or clustered standard errors for GAM models (mgcv::gam
) to your marginaleffects
package. So far, trying to use such models, R gives the warning that such SEs may not be supported by the model and calculates normal SEs instead. However, I think that the function gKRLS::estfun.gam
tries to facilitate such robust SE computation. I would really appreciate if you can look into the function and, in case that it really allows for such calculation, to think about integrating it into your package.
All the best,
Flo
Hi @FloKa89 ,
Glad you like the package.
marginaleffects can already integrate robust standard errors for any model, as long as you can supply a square covariance matrix of same dimensions as the number of coefficients. If the package you mention can supply such matrix, you can feed it to the vcov argument in marginaleffefts directly.
This issue collects a series of feature requests currently marked as "wontfix". If you want to continue the conversation on any of those features, please comment in the threads linked below: