Hi I am having trouble using the Mixed Model package as following the example doesnt seem to work. I get the following Method Error
ERROR: MethodError: no method matching LinearMixedModel(::Vector{Int64}, ::Matrix{Float64}, ::StatsModels.FormulaTerm{StatsModels.ContinuousTerm{Float64}, StatsModels.MatrixTerm{Tuple{StatsModels.InterceptTerm{true}, StatsModels.ContinuousTerm{Float64}, StatsModels.ContinuousTerm{Float64}, StatsModels.InteractionTerm{Tuple{StatsModels.ContinuousTerm{Float64}, StatsModels.ContinuousTerm{Float64}}}}}}, ::Vector{Any}, ::Nothing) Closest candidates are: LinearMixedModel(::AbstractArray, ::Tuple, ::StatsModels.FormulaTerm, ::Any, ::Any) at ~/.julia/packages/MixedModels/1FpDN/src/linearmixedmodel.jl:85 LinearMixedModel(::AbstractArray, ::Tuple, ::StatsModels.FormulaTerm, ::Any) at ~/.julia/packages/MixedModels/1FpDN/src/linearmixedmodel.jl:85 LinearMixedModel(::AbstractArray, ::MixedModels.FeTerm{T}, ::AbstractVector{<:MixedModels.AbstractReMat{T}}, ::StatsModels.FormulaTerm, ::Any) where T at ~/.julia/packages/MixedModels/1FpDN/src/linearmixedmodel.jl:139
using CSV: read
using DataFrames: DataFrame
using MixedAnova: anova
using MixedModels: LinearMixedModel, dataset, fit, @formula
df = read("data/SubsEnzYield.csv", DataFrame)
fm1 = fit(
LinearMixedModel,
@formula(Yield ~ Substrate + Enzyme + Substrate & Enzyme),
df
)
The method error states to pass a Vector and Matrix, however if I do so I am not sure how to construct the formula.
Thanks