Help with error in MixedModels.jl

Hello,

I am trying out MixedModels most basic functioning. I am loading data into Julia using the R package JuliaCall, in order to streamline the needed functionality into my existent R analysis, as described here.

While Douglas Bates’ demo with the kb07 data frame works without a problem, when trying to fit the model
rtlog ~ contrastcstimType + (1 + contrastcstimType | subj) + (1 + contrastc*stimType | stim)

to my data frame (where contrastc and rtlog are numeric, the rest factors),

I get the following error:

MethodError: no method matching getindex(::DataFrames.DataFrame, ::Expr)
Stacktrace:
[1] collect_to!(::Array{AbstractArray{T,1} where T,1}, ::Base.Generator{Array{Any,1},StatsModels.##23#25{DataFrames.DataFrame}}, ::Int64, ::Int64) at ./array.jl:508
[2] collect_to!(::Array{Array{Float64,1},1}, ::Base.Generator{Array{Any,1},StatsModels.##23#25{DataFrames.DataFrame}}, ::Int64, ::Int64) at ./array.jl:518
[3] _collect(::Array{Any,1}, ::Base.Generator{Array{Any,1},StatsModels.##23#25{DataFrames.DataFrame}}, ::Base.EltypeUnknown, ::Base.HasShape) at ./array.jl:489
[4] map(::Function, ::Array{Any,1}) at ./abstractarray.jl:1868
[5] #ModelFrame#22(::Dict{Any,Any}, ::Type{T} where T, ::StatsModels.Terms, ::DataFrames.DataFrame) at /Users/yanivabir/.julia/v0.6/StatsModels/src/modelframe.jl:144
[6] (::Core.#kw#Type)(::Array{Any,1}, ::Type{StatsModels.ModelFrame}, ::StatsModels.Terms, ::DataFrames.DataFrame) at ./:0
[7] #ModelFrame#27(::Array{Any,1},

Any ideas? I am obviously new to Julia, and the lack of any noticeable difference between the kb07 data frame and mine is frustrating…

thanks!

Hi, I’m the maintainer of JuliaCall.
Could you provide the exact code you are running? It is hard to tell where the problem is with just the formula and error messages.

Hi,

I found the issue just now - it’s not to do with JuliaCall, but with MixedModels.jl, which errors when random interaction terms are present in a formula, see this issue: https://github.com/dmbates/MixedModels.jl/issues/100.

Thanks for the response!