-
Notifications
You must be signed in to change notification settings - Fork 61
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
R Session Aborted #283
Comments
I narrowed it down to this but then it happens in C++ (which I don't know). I'm putting this here if someone wants to explore: y = 0.004401089
X = matrix(1, dimnames = list(NULL, "x"))
weights = 1.1
iterMax = 10000
diffMax = 1e-05
r_nb_id_Q = c(1L, 1L)
fe_id_list = list(1L, 1L)
table_id_I = c(1L, 1L)
slope_flag_Q = c(0L, 0L)
slope_vars_list = list(0)
r_init = 1
nthreads = 4
fixest:::cpp_demean(y, X, weights, iterMax, diffMax, r_nb_id_Q, fe_id_list, table_id_I,
slope_flag_Q, slope_vars_list, r_init, nthreads)
|
Hi, and sorry for the longuiish delay! Now fixed. |
I confirm, thanks! One small mistake in the error message though, in the example below I suppose it should be "Some variables" instead of "All variables"? library(fixest)
df <- data.frame(id = c(1, 1), time = c(1, 2), y = c(1, 0), x = c(1, 0), x2 = c(2, 1), x3 = c(0, 0))
model <- fepois(
y ~ x + x2 + x3 | id + time,
df
)
#> NOTE: 0/1 fixed-effect (1 observation) removed because of only 0 outcomes.
#> Error in fepois(y ~ x + x2 + x3 | id + time, df): All variables, 'x' and 'x2', are collinear with the fixed effects. In such
#> circumstances, the estimation is void. |
No, it's all , the three should be there... |
Ah, it's because x3 is an edge case and was removed before because equal to a constant 0. df <- data.frame(id = c(1, 1), time = c(1, 2), y = c(1, 0), x = c(1, 0), x2 = c(2, 1), x3 = c(6, 0))
model <- fepois(y ~ x + x2 + x3 | id + time, df)
#> NOTE: 0/1 fixed-effect (1 observation) removed because of only 0 outcomes.
#> Error in fepois(y ~ x + x2 + x3 | id + time, df) :
#> All variables, 'x', 'x2' and 'x3', are collinear with the fixed effects. In such circumstances, the estimation is void. I remove 0-only variables beforehand. I do not give warnings since it can happen for factors when manipulating the data (hence there would be too much false positives). Thanks for checking! :-) |
Hi,
I've noticed that for some data sets, small once where the data is not sufficient to estimate the parameters, an error is thrown but for others the R session simply crashes. Below an example.
The text was updated successfully, but these errors were encountered: