-
Notifications
You must be signed in to change notification settings - Fork 15
Description
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