Skip to content

a note on DIC in dockerHDDM #9

@XiaoyuZeng

Description

@XiaoyuZeng

Hi all.
As a newcomer to dockerHDDM, I found it harder to directly and easily extract the DIC of one model.
In the tutorial ipynb linked in your paper, I indeed found code related to extracting DIC from several models:

tmp_dic = []
indx_name = []
for m_key, model in models.items():
    m_tmp = kabuki.utils.concat_models(model)
    tmp_dic.append(m_tmp.dic)
    indx_name.append(m_key)
    
comp_dic = pd.DataFrame(tmp_dic, index=indx_name, columns=['dic'])
comp_dic = comp_dic.sort_values(by=['dic'])
comp_dic = comp_dic.reset_index()
comp_dic.rename(columns={'index':'rank'}, inplace=True)

However, models here refers to the output of the HDDMarviz function that simultaneously fits several models. If someone separately fits several models, they can be confused about the models variable here, just like me : )

m_tmp = kabuki.utils.concat_models(ms3res)
m_tmp.dic

Surely this can be easily achieved by combining data using kabuki and then extracting DIC, but it would be better if a user could easily extract DIC from output data. Or maybe just explicitly clarify how to extract DIC when separately fitting models?

Best,
Xiaoyu

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions