TuringGLM.jl icon indicating copy to clipboard operation
TuringGLM.jl copied to clipboard

Multivariate GLMs

Open ParadaCarleton opened this issue 3 years ago • 2 comments

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

ParadaCarleton avatar Mar 01 '22 01:03 ParadaCarleton

Does StatsModels.jl and MixedModels.jl formulas support multivariate stuff in the right hand side of ~?

storopoli avatar Sep 05 '22 21:09 storopoli

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.

emfeltham avatar Mar 13 '23 23:03 emfeltham