I’d say at a minimum univariate regression without intercept is something fairly non-standard in the world of regression modelling, and you might as well just do x\y
without using any packages if that’s all you’re after? Or alternatively read this very detailed thread on all the different ways to do linear regression in Julia.
I’m not sure there’s a particular reason why all methods in GLM require a matrix for the covariates (other than I assume this is by far the most common use case for people using GLM, and even for a univariate regression people will generally hcat
a vector of ones to x
to include an intercept, creating a matrix), but I’m also not sure it needs new methods when you can just do lm(reshape(x, length(x), 1)
if you absolutely want to use lm
to do x\y
. But I guess you could try a PR that defines lm(x::AbstractVector, y::AbstractVector) = lm(reshape(x, length(x), 1), y)
and see what the maintainers think.