Open thorek1 opened 3 years ago
Hi,
it would be great to have alpaca automatically remove collinear variables. See the issue here and how fixest tackles it:
n <- 100 dat <- data.frame(y = runif(n) > .5, x1 = rnorm(n), x2 = rnorm(n) + 2, x2 = (rnorm(n) + 2) / 2, x3 = sample(LETTERS[1:3],n, T)) library(alpaca) alpaca::feglm(y ~ x1 + x2 | x3,dat) alpaca::feglm(y ~ x1 + x2 | x3,dat) alpaca::feglm(y ~ x1 + x2 * x3 | x3,dat) #Error in qr.solve(X, z, epsilon) : singular matrix 'a' in solve library(fixest) fixest::feglm(y ~ x1 + x2 | x3,dat) fixest::feglm(y ~ x1 + x2 | x3,dat) fixest::feglm(y ~ x1 + x2 * x3 | x3,dat) # Variables 'x3B' and 'x3C' have been removed because of collinearity (see $collin.var).
Thore
Thanks, it is on our agenda.
Hi,
it would be great to have alpaca automatically remove collinear variables. See the issue here and how fixest tackles it:
Thore