Skip to content

issue with MAP() function #33

@ShanJG

Description

@ShanJG

Hi! I wanted to use the Hierarchical function to create a hierarchical model for my project, but got an error message:

Error using mle>validateInputTypes (line 769)
Expected input to be one of these types:

single, double

Instead its type was struct.

After digging into it, it seems to me that in MAP(data, model) function, which is used in Hierarchical , the mle function from Statistics and Machine Learning Toolbox is used, with:

vals{c} = mle(data, 'logpdf', logPosterior, 'start', model.start(c,:), ...
'lowerbound', model.lowerbound, 'upperbound', model.upperbound, ...
'options', options);

But the mle is expecting "data" to be a vector variable, not a struct.

I'm not sure if it is a compatibility problem caused by the newer version of Statistics Toolbox (mine is version 12.2). Could you please see into this and update the MAP() function accordingly? It would be great if there's another way to run the MAP() function because I desperately need it for my group-level analysis - I tried fitting each subject individually but the results are not great.

Thank you!

Best,
Jiangang

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions