GLM.jl Is posulbie to use lm() for two vectors without DataFrames?

Is posulbie to use lm() for two vectors"

julia>using GLM
 x=rand(10);

julia> y=rand(10);

julia> lm(x,y)
ERROR: MethodError: no method matching...

Just I cant to use DataFrames.
Thanks, Paul

You need a two-dimensional array for X:

X = [ones(10) rand(10)]
y = rand(10) 
lm(X, y)
1 Like

Magic :slight_smile: