Phillip Alday

Results 297 comments of Phillip Alday

I'll need to actually look at the current sparse code, but it's not too hard to a more proper sparse constructor that allocates a bunch of intermediate sparse matrices but...

What would this look like for `FormulaTerm`s? Random effects in MixedModels.jl are initially parsed as `FormulaTerm`s.

@PharmCat how many contrast levels do you have? If this is for the grouping variable in MixedModels.jl, then there is the `Grouping()` pseudocontrast which avoids creating an actual matrix

The nesting syntax `/` is implemented in [`RegressionFormulae.jl`](https://github.com/kleinschmidt/RegressionFormulae.jl)

The implementation of `Grouping()` is quite simple: https://github.com/JuliaStats/MixedModels.jl/blob/621f88b1f594ea0827d9ac7e8628113dd2121bef/src/grouping.jl#L2-L34 Depending on the exact structure of your model, you might be able to skip using the full formula infrastructure and instead call...

There's nothing wrong with copying this code, but maybe @kleinschmidt has thoughts on whether it makes more general sense to include this in StatsModels?

Another example is the nesting syntax. I have some initial work on parsing it as `FunctionTerm{typeof(/)}`. In the R variant `a/b` expands to `a` + `a:b`, but this has slightly...

xref #251 -- we should probably support arbitrary matrix containers and eltypes to allow e.g. sparse matrices in single precision.

@ararslan I mostly agree, changes to the type parameters (and I suspect that we should maybe have the storage type as a type parameter) can have all sorts of wonky...

This is what the `contrasts` argument is for. For example, you could use `contrasts=Dict(:state => DummyCoding())` to achieve that effect in `GLM.jl` or `MixedModels.jl`. It's also generally very Julian to...