Matthieu Gomez
Matthieu Gomez
One alternative is to simply define `lag` on AbstractVectors: ```julia function lag(x::AbstractVector, t::AbstractVector, n = 1) [i == nothing ? missing : x[i] for i in indexin(t .- n, t)]...
Thanks for the tip — this is what I do for now. Still, it may be better to simply remove these type parameters.
I have three difference use cases in [FixedEffectModels](https://github.com/matthieugomez/FixedEffectModels.jl), you can simply read the Readme. Or look at all the R packages that rely on [multipart formula](https://cran.r-project.org/web/packages/Formula/index.html) Macros can work with...
Maybe I will be clearer if I delve into [FixedEffectModels](https://github.com/matthieugomez/FixedEffectModels.jl). To estimate these kinds of models, an estimation command requires the user to specify (i) a formula (ii) a set...
@ararslan I don't think this overloading would work. This overloading would completely abuse mathematical notations : clustered variables refer to methods to compute standard errors, not variables to regress on....
Yes, that would work. But why would you need to only capture the arguments prefixed by `~`? The macro could also capture everything, i.e. something like ```julia macro fit(x, args...)...
@nalimilan I agree, but this problem is common to every dplyr-like data manipulations (like DataFramesMeta). @andreasnoack Something like this would work indeed. ```julia fit(df, @formula(y ~ x1), fe = @formula(x3&x4...
Maybe we can come back to this issue once there is a commonly accepted way to handle expressions that may or may not use variable names (i.e. something akin to...
Right, I agree with this.
@nalimilan Your solution would work but I don't really like this syntax. Using `~` as a prefix to capture an expression is an R quirk and I would be glad...