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

Support for fixest models #167

Closed
larmarange opened this issue Jun 30, 2022 · 1 comment · Fixed by #168
Closed

Support for fixest models #167

larmarange opened this issue Jun 30, 2022 · 1 comment · Fixed by #168

Comments

@larmarange
Copy link
Owner

See ggobi/ggally#443

CC: @JackTRametta

library(fixest)
library(broom.helpers)

mod <- feols(fml = mpg ~ am, data = mtcars)
tidy_plus_plus(mod)
#> x Unable to identify the list of variables.
#> 
#> This is usually due to an error calling `stats::model.frame(x)`or `stats::model.matrix(x)`.
#> It could be the case if that type of model does not implement these methods.
#> Rarely, this error may occur if the model object was created within
#> a functional programming framework (e.g. using `lappy()`, `purrr::map()`, etc.).
#> Error in `dplyr::left_join()`:
#> ! Join columns must be present in data.
#> x Problem with `variable`.
model.frame(mod)
#> Error in eval(predvars, data, env): objet 'mpg' introuvable
model.matrix(mod)
#>       (Intercept) am
#>  [1,]           1  1
#>  [2,]           1  1
#>  [3,]           1  1
#>  [4,]           1  0
#>  [5,]           1  0
#>  [6,]           1  0
#>  [7,]           1  0
#>  [8,]           1  0
#>  [9,]           1  0
#> [10,]           1  0
#> [11,]           1  0
#> [12,]           1  0
#> [13,]           1  0
#> [14,]           1  0
#> [15,]           1  0
#> [16,]           1  0
#> [17,]           1  0
#> [18,]           1  1
#> [19,]           1  1
#> [20,]           1  1
#> [21,]           1  0
#> [22,]           1  0
#> [23,]           1  0
#> [24,]           1  0
#> [25,]           1  0
#> [26,]           1  1
#> [27,]           1  1
#> [28,]           1  1
#> [29,]           1  1
#> [30,]           1  1
#> [31,]           1  1
#> [32,]           1  1

Created on 2022-06-30 by the reprex package (v2.0.1)

@larmarange
Copy link
Owner Author

To explore after next release

Possible wirk around: model.frame(mod, data = get(mod$call$data, mod$call_env))

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

Successfully merging a pull request may close this issue.

1 participant