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
predict
This is sort of self-assigned:
julia> using FixedEffectModels, DataFrames julia> df = DataFrame(y=rand(10), id = rand(1:2, 10), t = rand(1:2, 10)); julia> predict(reg(df, @formula(y ~ fe(id) + fe(t)), save = :fe), df) ERROR: ArgumentError: collection must be non-empty Stacktrace: [1] first(itr::@NamedTuple{}) @ Base .\abstractarray.jl:470 [2] missing_omit(d::@NamedTuple{}) @ StatsModels C:\Users\ngudat\.julia\packages\StatsModels\syVEq\src\modelframe.jl:57 [3] missing_omit(data::@NamedTuple{y::Vector{Float64}, id::Vector{Int64}, t::Vector{Int64}}, formula::MatrixTerm{Tuple{InterceptTerm{false}}}) @ StatsModels C:\Users\ngudat\.julia\packages\StatsModels\syVEq\src\modelframe.jl:70 [4] predict(m::FixedEffectModel, data::DataFrame) @ FixedEffectModels C:\Users\ngudat\.julia\packages\FixedEffectModels\9B0we\src\FixedEffectModel.jl:142 [5] top-level scope @ REPL[34]:1 julia> predict(reg(df, @formula(y ~ id + fe(t)), save = :fe), df) 10-element Vector{Float64}: (...)
a workaround is to add a column of ones:
df.x .= 1 reg(@formula(y ~ -1 + x + fe(id) + fe(t))
but that's clearly not ideal.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is sort of self-assigned:
a workaround is to add a column of ones:
but that's clearly not ideal.
The text was updated successfully, but these errors were encountered: