Open ParadaCarleton opened 2 years ago
Does StatsModels.jl
and MixedModels.jl
formulas support multivariate stuff in the right hand side of ~
?
I think that this would be a great idea, but there may be some practical issues. I don't believe that MixedModels.jl supports multivariate (not multiple) linear models. Even MultivariateStats.jl doesn't seem to support it.
If I enter a formula with multiple responses variables, it appears to work, at least minimally:
julia> @formula(y + z ~ 1 + x)
FormulaTerm
Response:
y(unknown)
z(unknown)
Predictors:
1
x(unknown)
But, it looks like there have been some questions about easily implementing multivariate models in Turing more generally; e.g., https://discourse.julialang.org/t/singular-exception-with-lkjcholesky/85020 (there are other discussion too, some of which are linked therein). People seem to be having issues with using a prior commonly used for the covariance matrix in multivariate regression models.
Multivariate GLMs are very common in econometrics and also very useful in general. I think this is low-hanging fruit in terms of relative effort vs payoff: Multivariate GLMs should be simple to implement, since they just require generalizing a handful of formulas to accept matrices, but they're extremely useful because they solve the problems typically misidentified as "Multiple comparisons."
Relevant