I have the following data set and I wanted to run a mixed effects linear model as below:
Type Season Price Sales
A Fall 34 500
A Winter 20 300
B Fall 15 100
B Winter 10 150
fm = model = smf.mixedlm("Sales ~ Price", df, groups = df[["Type","Season"]],
re_formula = "~Price")
However, I am getting the following error:
unhashable type: 'numpy.ndarray'
Could you please help me with this issue. This model can be easily done in R but I was not able to find a compatible example in python.