Hello, everyone.

I am attempting to use MixedModels to produce a model that would (in R using lme4) otherwise look like this:

(Edited formula):

model = lmer( y ~ x * cond1 * cond2

+ (1+x * cond1 * cond2 | region )

, data = rawdata )

Although this is an oversimplification of the full model, this model does work within the context of R.

I have attempted the following in Julia, but have received errors:

pool!(rawdata, [:region])

(region column is originally string, and so converion to PooledDataArray is needed?)

model = fit!(lmm(@formula( y ~ x & cond1 & cond2 + (1+ x & cond1 & cond2 | region) ), rawdata ))

(returns:) MethodError: no method matching getindex(::DataFrames.DataFrame, ::Expr)

Oddly enough, removing the interaction specification from the random term allowed the model to work fine:

model = fit!(lmm(@formula( y ~ x & cond1 & cond2 + (1+ x | region) ), rawdata ))

Is there a way to specify random interactions within MixedModels similar to lme4? Any help would be greatly appreciated.