As the title says. After I load pglm
, lag
stops to work properly.
library(pglm)
c(1,2,3,4) %>% lag()
the object is converted into a time series and is not compatible anymore with tibbles.
Even unloading pglm
, the dependency for lag
is still effective.
A solution could be to actually never load pglm
, but then if I have a lag(x)
in the formula
pglm:pglm(
family= poisson,
y ~ lag(x),
model = "within", index="id",
data = db
)
The algorithm cannot converge into an estimate. For some reasons this happens even forcing stats::lag(x)
. The fun thing is that, instead, if pglm
is loaded, y ~ lag(x)
works properly as y ~ stats:lag(x)
.
This is the only case where it works, tho! The only other thing that I think of is that outside formulas, dplyr::lag
is the culprit for the conflict.
I don't know how to optimise the workflow, have you suggestions?