Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bug with fetch_arg_deparse #540

Open
kylebutts opened this issue Feb 19, 2025 · 0 comments
Open

Minor bug with fetch_arg_deparse #540

kylebutts opened this issue Feb 19, 2025 · 0 comments

Comments

@kylebutts
Copy link
Contributor

Super obscure bug, but figured I would report. If you pass a custom vcov function to vcov argument and namespace fixest::feols, then fetch_arg_deparse fails since mc[[1]] is fixest::feols which apparently has length > 1.

library(fixest)
feols(
  mpg ~ hp + i(cyl),
  data = mtcars, 
  vcov = function(x) { vcov(x, "hc1") }
)
#> OLS estimation, Dep. Var.: mpg
#> Observations: 32
#> Standard-errors: {vcov(x, "hc1")} 
#>              Estimate Std. Error  t value   Pr(>|t|)    
#> (Intercept) 28.650118   1.697237 16.88044 3.2885e-16 ***
#> hp          -0.024039   0.013201 -1.82096 7.9316e-02 .  
#> cyl::6      -5.967655   1.527542 -3.90670 5.3934e-04 ***
#> cyl::8      -8.520851   2.191241 -3.88860 5.6604e-04 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 2.94304   Adj. R2: 0.727485
fixest::feols(
  mpg ~ hp + i(cyl),
  data = mtcars, 
  vcov = function(x) { vcov(x, "hc1") }
)
#> Error in if (grepl("[tT]ry", mc[[1]])) next: the condition has length > 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant