Skip to content

LME error plot - not working

I think the array shapes used in the lmefit() are not matching properly:

Traceback (most recent call last):

  File "L:/My Drive/pyR2/ForGit/r2gui/ui.py", line 1226, in errFitTypeFunc
    mwFitError.plot(self.r2.lmefit)

  File "L:/My Drive/pyR2/ForGit/r2gui/ui.py", line 87, in plot
    callback(ax=ax)

  File "L:\My Drive\pyR2\ForGit\r2gui\api\Survey.py", line 773, in lmefit
    md = smf.mixedlm('obsErr~avgR', re_formula="~avgR", data=df, groups=df[['c1','c2','p1','p2']])

  File "F:\Programs\Anaconda3\lib\site-packages\statsmodels\regression\mixed_linear_model.py", line 935, in from_formula
    exog_vc=exog_vc, groups=groups, *args, **kwargs)

  File "F:\Programs\Anaconda3\lib\site-packages\statsmodels\base\model.py", line 174, in from_formula
    mod = cls(endog, exog, *args, **kwargs)

  File "F:\Programs\Anaconda3\lib\site-packages\statsmodels\regression\mixed_linear_model.py", line 681, in __init__
    group_labels = list(set(groups))

TypeError: unhashable type: 'numpy.ndarray'
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information