Add ml_fit
function to the package
#263
Replies: 2 comments
-
At some time in the past I thought about something similar. Were you thinking about this for a generic bmmodel for which the function takes the same specification as bmm(), but ignores the potential hierarhical structure and splits the datasets by any hierarhical component, gets ml estimates, and glues everything back together (basically treating random effects as fixed effects? Btw, in stan there are also non-mcmc fitting algorithms for such a purpose (though I have found they rarely converge for any hierarhical models). |
Beta Was this translation helpful? Give feedback.
-
I thought about both fitting the hierarchical model using the ML algorithm provided by Stan (but assumed that this might run into issues), as well as providing a function that does subject/condition wise ML approach and returns a data frame with the estimated parameters for each subject/condition. The latter could require some coding work, if we want to accommodate complex So, the question really is, if we see a real benefit for functionality like this. |
Beta Was this translation helpful? Give feedback.
-
I was thinking if it would be useful to add an
ml_fit
function to the package that uses the implementedpdf
functions (e.g.dmixture2p
,dsdm
, ordm3
) for the different models and provides ML estimates.The main question for me is, what the use case would be. As in principle, I would always strongly advise to aim for a one step inference approach as we have implemented it in
bmm
. In some cases, it could still be useful to first fit the data with ML and have the benefit of quick parameter estimation. For example, this could help to set more informative priors when using a model in a new task or it could help make some quick decisions about which model to best implement with the Bayesian Hierarchical approach, and avoid long wait times when exploring different options of implementing complex models inbmm
Beta Was this translation helpful? Give feedback.
All reactions