You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to fit a model with two grouping factors and one covariate. One has many levels (more than 20,000) and one has only a few hundred. There are ~70,000 data. I'm getting an error whenever I add a random slope of the covariate by the factor with 200 levels. The models fits without issues if I exclude random slopes.
ERROR: MethodError: rmulΛ!(::BlockedSparse{Float64,2,1}, ::ReMat{Float64,1}) is ambiguous. Candidates:
rmulΛ!(A::M, B::ReMat{T,1}) where {T, M<:AbstractArray{T,2}} in MixedModels at /home/bryor/.juliapro/JuliaPro_v1.3.1-1/packages/MixedModels/qyKOf/src/remat.jl:391
rmulΛ!(A::BlockedSparse{T,S,P}, B::ReMat{T,P}) where {T, S, P} in MixedModels at /home/bryor/.juliapro/JuliaPro_v1.3.1-1/packages/MixedModels/qyKOf/src/remat.jl:405
Possible fix, define
rmulΛ!(::Union{M<:BlockedSparse{T,S,1}, M<:BlockedSparse{T,S,1}, M<:(BlockedSparse{T,S,1} where S)}, ::Union{ReMat{T,1}, ReMat{T,1}, ReMat{T,1}})
Stacktrace:
[1] updateL!(::LinearMixedModel{Float64}) at /home/bryor/.juliapro/JuliaPro_v1.3.1-1/packages/MixedModels/qyKOf/src/linearmixedmodel.jl:678
[2] #fit!#38(::Bool, ::Bool, ::typeof(fit!), ::LinearMixedModel{Float64}) at /home/bryor/.juliapro/JuliaPro_v1.3.1-1/packages/MixedModels/qyKOf/src/linearmixedmodel.jl:251
[3] (::StatsBase.var"#kw##fit!")(::NamedTuple{(:verbose, :REML),Tuple{Bool,Bool}}, ::typeof(fit!), ::LinearMixedModel{Float64}) at ./none:0
[4] #fit#35(::Array{Any,1}, ::Dict{Symbol,Any}, ::Bool, ::Bool, ::typeof(fit), ::Type{LinearMixedModel}, ::StatsModels.FormulaTerm{StatsModels.Term,Tuple{StatsModels.Term,StatsModels.FunctionTerm{typeof(|),var"#25#27",(:Item,)},StatsModels.FunctionTerm{typeof(|),var"#26#28",(:FreqZipfUS, :Subject)}}}, ::NamedTuple{(:RT, :FreqZipfUS, :Subject, :Item),Tuple{CSV.Column{Float64,Float64},CSV.Column{Union{Missing, Float64},Union{Missing, Float64}},CategoricalArray{Int64,1,UInt32,Int64,CategoricalValue{Int64,UInt32},Union{}},CategoricalArray{String,1,UInt32,String,CategoricalString{UInt32},Union{}}}}) at /home/bryor/.juliapro/JuliaPro_v1.3.1-1/packages/MixedModels/qyKOf/src/linearmixedmodel.jl:116
[5] (::StatsBase.var"#kw##fit")(::NamedTuple{(:wts, :contrasts, :verbose, :REML),Tuple{Array{Any,1},Dict{Symbol,Any},Bool,Bool}}, ::typeof(fit), ::Type{LinearMixedModel}, ::StatsModels.FormulaTerm{StatsModels.Term,Tuple{StatsModels.Term,StatsModels.FunctionTerm{typeof(|),var"#25#27",(:Item,)},StatsModels.FunctionTerm{typeof(|),var"#26#28",(:FreqZipfUS, :Subject)}}}, ::NamedTuple{(:RT, :FreqZipfUS, :Subject, :Item),Tuple{CSV.Column{Float64,Float64},CSV.Column{Union{Missing, Float64},Union{Missing, Float64}},CategoricalArray{Int64,1,UInt32,Int64,CategoricalValue{Int64,UInt32},Union{}},CategoricalArray{String,1,UInt32,String,CategoricalString{UInt32},Union{}}}}) at ./none:0
[6] #fit#34(::Array{Any,1}, ::Dict{Symbol,Any}, ::Bool, ::Bool, ::typeof(fit), ::Type{LinearMixedModel}, ::StatsModels.FormulaTerm{StatsModels.Term,Tuple{StatsModels.Term,StatsModels.FunctionTerm{typeof(|),var"#25#27",(:Item,)},StatsModels.FunctionTerm{typeof(|),var"#26#28",(:FreqZipfUS, :Subject)}}}, ::DataFrame) at /home/bryor/.juliapro/JuliaPro_v1.3.1-1/packages/MixedModels/qyKOf/src/linearmixedmodel.jl:110
[7] fit(::Type{LinearMixedModel}, ::StatsModels.FormulaTerm{StatsModels.Term,Tuple{StatsModels.Term,StatsModels.FunctionTerm{typeof(|),var"#25#27",(:Item,)},StatsModels.FunctionTerm{typeof(|),var"#26#28",(:FreqZipfUS, :Subject)}}}, ::DataFrame) at /home/bryor/.juliapro/JuliaPro_v1.3.1-1/packages/MixedModels/qyKOf/src/linearmixedmodel.jl:110
[8] top-level scope at REPL[32]:1
The text was updated successfully, but these errors were encountered:
Cool, thanks, can you share your formula too? :) I'm guessing Y ~ X + (1|F1) (1|F2)? And there seem to be missing values in X -- am I parsing the file correctly?
I'm trying to fit a model with two grouping factors and one covariate. One has many levels (more than 20,000) and one has only a few hundred. There are ~70,000 data. I'm getting an error whenever I add a random slope of the covariate by the factor with 200 levels. The models fits without issues if I exclude random slopes.
The text was updated successfully, but these errors were encountered: