We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using GLM using DataFrames df1 = DataFrame(y = rand(10)) df2 = DataFrame(y = rand(10)) model = lm(@formula(y~1),df1) y = predict(model,df2)
Gives the following error: ERROR: ArgumentError: collection must be non-empty
ERROR: ArgumentError: collection must be non-empty
I realize this is a weird edge case, but I think it should just return mean(df1.y) for each prediction.
mean(df1.y)
The text was updated successfully, but these errors were encountered:
In addition, also the show method is broken in this case
show
julia> model LinearModel y ~ 1 Error showing value of type LinearModel{GLM.LmResp{Vector{Float64}}, GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}}}: ERROR: MethodError: no method matching StatsBase.CoefTable(::Matrix{Float64}, ::Vector{String}, ::String, ::Int64, ::Int64) Closest candidates are: StatsBase.CoefTable(::Matrix, ::Vector, ::Vector, ::Int64, ::Int64) @ StatsBase ~/.julia/packages/StatsBase/ebrT3/src/statmodels.jl:23 StatsBase.CoefTable(::Vector, ::Vector, ::Vector, ::Int64, ::Int64) @ StatsBase ~/.julia/packages/StatsBase/ebrT3/src/statmodels.jl:10 StatsBase.CoefTable(::Matrix, ::Vector, ::Vector, ::Int64) @ StatsBase ~/.julia/packages/StatsBase/ebrT3/src/statmodels.jl:23 ... Stacktrace: [1] coeftable(mm::LinearModel{GLM.LmResp{Vector{Float64}}, GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}}}; level::Float64) @ GLM ~/.julia/dev/GLM/src/lm.jl:257 [2] coeftable @ ~/.julia/dev/GLM/src/lm.jl:243 [inlined] [3] show(io::IOContext{Base.TTY}, obj::LinearModel{GLM.LmResp{Vector{Float64}}, GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64, Matrix{Float64}, Vector{Int64}}}}) @ GLM ~/.julia/dev/GLM/src/linpred.jl:324 [4] show(io::IOContext{Base.TTY}, ::MIME{Symbol("text/plain")}, x::LinearModel{GLM.LmResp{Vector{…}}, GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{…}}}) @ Base.Multimedia ./multimedia.jl:47
Sorry, something went wrong.
No branches or pull requests
Gives the following error:
ERROR: ArgumentError: collection must be non-empty
I realize this is a weird edge case, but I think it should just return
mean(df1.y)
for each prediction.The text was updated successfully, but these errors were encountered: