Hi,
I am following this code
https://mne.tools/mne-nirs/stable/auto_examples/general/plot_12_group_glm.html#id9
to obtain a similar Group topographic visualisation with my fNIRS data.
I typed this code:
ch_model = smf.mixedlm("theta ~ -1 + ch_name:Chroma:subject",grp_results, groups=grp_results['ID']).fit(method='nm')
ch_model_df = statsmodels_to_results(ch_model.summary)
but when I use statsmodels_to_results I have this error
ch_model_df = statsmodels_to_results(ch_model)
Traceback (most recent call last):
File “/var/folders/vk/yv_5r9997_n9mr3vt6gw0vwh0000gn/T/ipykernel_7881/1169074141.py”, line 1, in
ch_model_df = statsmodels_to_results(ch_model)
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/mne_nirs/statistics/_statsmodels.py”, line 103, in statsmodels_to_results
df.iloc[sl, df.columns == ‘Std.Err.’] = stderr
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/pandas/core/indexing.py”, line 670, in setitem
iloc._setitem_with_indexer(indexer, value)
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/pandas/core/indexing.py”, line 1745, in _setitem_with_indexer
isetter(ilocs[0], value)
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/pandas/core/indexing.py”, line 1676, in isetter
ser = self.obj._ixs(loc, axis=1)
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/pandas/core/frame.py”, line 2846, in _ixs
values = self._mgr.iget(i)
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/pandas/core/internals/managers.py”, line 988, in iget
block = self.blocks[self.blknos[i]]
TypeError: only integer scalar arrays can be converted to a scalar index
[SpyderKernelApp] ERROR | Error in message handler
Traceback (most recent call last):
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/ipykernel/kernelbase.py”, line 461, in dispatch_queue
await self.process_one()
File “/opt/anaconda3/envs/mlaroccaenv/lib/python3.7/site-packages/ipykernel/kernelbase.py”, line 450, in process_one
await dispatch(*args)
TypeError: object NoneType can’t be used in ‘await’ expression