Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with MAP() function #33

Open
ShanJG opened this issue Oct 14, 2023 · 0 comments
Open

issue with MAP() function #33

ShanJG opened this issue Oct 14, 2023 · 0 comments

Comments

@ShanJG
Copy link

ShanJG commented Oct 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant